Merge pull request 'Changes in background and dark mode' (#28) from bg_fixes_ into main
Build & Push Docker Images / Detect Changes (push) Successful in 8s
Build & Push Docker Images / Backend Tests (push) Has been skipped
Build & Push Docker Images / Frontend Tests (push) Has been skipped
Build & Push Docker Images / Build Backend (push) Has been skipped
Build & Push Docker Images / Build Frontend (push) Has been skipped
Build & Push Docker Images / Deploy (push) Has been skipped
Build & Push Docker Images / Detect Changes (push) Successful in 8s
Build & Push Docker Images / Backend Tests (push) Has been skipped
Build & Push Docker Images / Frontend Tests (push) Has been skipped
Build & Push Docker Images / Build Backend (push) Has been skipped
Build & Push Docker Images / Build Frontend (push) Has been skipped
Build & Push Docker Images / Deploy (push) Has been skipped
Reviewed-on: #28
This commit was merged in pull request #28.
This commit is contained in:
@@ -81,24 +81,34 @@ function RootLayoutInner() {
|
||||
);
|
||||
}
|
||||
|
||||
export default function RootLayout() {
|
||||
function ThemedBackground({ children }: { children: React.ReactNode }) {
|
||||
const { isDark } = useThemeContext();
|
||||
|
||||
return (
|
||||
<GestureHandlerRootView style={{ flex: 1 }}>
|
||||
<ImageBackground
|
||||
source={require('../assets/bg.png')}
|
||||
source={isDark ? require('../assets/bg_dark.png') : require('../assets/bg.png')}
|
||||
style={bgStyles.background}
|
||||
resizeMode="cover"
|
||||
imageStyle={bgStyles.backgroundImage}
|
||||
>
|
||||
<View style={bgStyles.overlay} />
|
||||
<View style={[bgStyles.overlay, isDark && bgStyles.overlayDark]} />
|
||||
{children}
|
||||
</ImageBackground>
|
||||
);
|
||||
}
|
||||
|
||||
export default function RootLayout() {
|
||||
return (
|
||||
<GestureHandlerRootView style={{ flex: 1 }}>
|
||||
<SafeAreaProvider>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<ThemeProvider>
|
||||
<ThemedBackground>
|
||||
<RootLayoutInner />
|
||||
</ThemedBackground>
|
||||
</ThemeProvider>
|
||||
</QueryClientProvider>
|
||||
</SafeAreaProvider>
|
||||
</ImageBackground>
|
||||
</GestureHandlerRootView>
|
||||
);
|
||||
}
|
||||
@@ -108,10 +118,13 @@ const bgStyles = StyleSheet.create({
|
||||
flex: 1,
|
||||
},
|
||||
backgroundImage: {
|
||||
opacity: 0.8,
|
||||
opacity: 0.55,
|
||||
},
|
||||
overlay: {
|
||||
...StyleSheet.absoluteFillObject,
|
||||
backgroundColor: 'rgba(255, 252, 245, 0.2)',
|
||||
backgroundColor: 'rgba(255, 252, 245, 0.48)',
|
||||
},
|
||||
overlayDark: {
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.25)',
|
||||
},
|
||||
});
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
@@ -26,7 +26,7 @@ export const colors = {
|
||||
warning: '#FF9500',
|
||||
|
||||
// Surface
|
||||
background: '#fbfbfb',
|
||||
background: 'transparent',
|
||||
card: '#ffffff',
|
||||
surfaceLow: '#f2f4f5',
|
||||
surface: '#eceeef',
|
||||
@@ -72,7 +72,7 @@ export const darkColors = {
|
||||
warning: '#FF9500',
|
||||
|
||||
// Surface
|
||||
background: '#121212',
|
||||
background: 'transparent',
|
||||
card: '#1e1e1e',
|
||||
surfaceLow: '#2a2a2a',
|
||||
surface: '#333333',
|
||||
|
||||
Reference in New Issue
Block a user