Merge pull request #752 from vector-im/feature/bma/onBoardingIteration

Desing: onboarding iteration
This commit is contained in:
Benoit Marty 2023-07-03 20:28:16 +02:00 committed by GitHub
commit 29e87ca7da
19 changed files with 98 additions and 103 deletions

View file

@ -50,6 +50,10 @@ fun OnBoardingPage(
footer: @Composable () -> Unit = {},
content: @Composable () -> Unit = {},
) {
// Note: having a night variant of R.drawable.onboarding_bg in the folder `drawable-night` is working
// at runtime, but is not in Android Studio Preview. So I prefer to handle this manually.
val isLight = ElementTheme.colors.isLight
val bgDrawableRes = if (isLight) R.drawable.onboarding_bg_light else R.drawable.onboarding_bg_dark
Box(
modifier = modifier
.fillMaxSize()
@ -58,7 +62,7 @@ fun OnBoardingPage(
Image(
modifier = Modifier
.fillMaxSize(),
painter = painterResource(id = R.drawable.onboarding_bg),
painter = painterResource(id = bgDrawableRes),
contentScale = ContentScale.Crop,
contentDescription = null,
)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB