diff --git a/mail-spotlight/presentation/src/main/kotlin/ch/protonmail/android/mailspotlight/presentation/ui/SpotlightFeatureDetailPage.kt b/mail-spotlight/presentation/src/main/kotlin/ch/protonmail/android/mailspotlight/presentation/ui/SpotlightFeatureDetailPage.kt index e2aa709f1c..be09346aff 100644 --- a/mail-spotlight/presentation/src/main/kotlin/ch/protonmail/android/mailspotlight/presentation/ui/SpotlightFeatureDetailPage.kt +++ b/mail-spotlight/presentation/src/main/kotlin/ch/protonmail/android/mailspotlight/presentation/ui/SpotlightFeatureDetailPage.kt @@ -51,10 +51,10 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign -import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import ch.protonmail.android.design.compose.theme.ProtonDimens import ch.protonmail.android.design.compose.theme.ProtonTheme +import ch.protonmail.android.mailcommon.presentation.AdaptivePreviews import ch.protonmail.android.mailcommon.presentation.NO_CONTENT_DESCRIPTION import ch.protonmail.android.mailspotlight.presentation.R import ch.protonmail.android.mailspotlight.presentation.model.FeatureDetailPageContent @@ -99,6 +99,8 @@ private fun PortraitFeatureDetailPage(content: FeatureDetailPageContent, modifie ) } + Spacer(modifier = Modifier.height(ProtonDimens.Spacing.Large)) + Text( text = stringResource(content.titleRes), style = ProtonTheme.typography.headlineMedium.copy(fontWeight = FontWeight.Bold), @@ -206,8 +208,7 @@ private const val LANDSCAPE_ILLUSTRATION_WEIGHT = 2f private const val LANDSCAPE_TEXT_WEIGHT = 3f private const val LANDSCAPE_IMAGE_MAX_HEIGHT_FRACTION = 0.75f -@Preview(uiMode = Configuration.UI_MODE_NIGHT_NO, showBackground = true) -@Preview(uiMode = Configuration.UI_MODE_NIGHT_YES, showBackground = true) +@AdaptivePreviews @Composable private fun FeatureDetailPageB2CUnreadPreview() { ProtonTheme { @@ -224,8 +225,7 @@ private fun FeatureDetailPageB2CUnreadPreview() { } } -@Preview(uiMode = Configuration.UI_MODE_NIGHT_NO, showBackground = true) -@Preview(uiMode = Configuration.UI_MODE_NIGHT_YES, showBackground = true) +@AdaptivePreviews @Composable private fun FeatureDetailPageB2CCategoriesPreview() { ProtonTheme { @@ -242,7 +242,7 @@ private fun FeatureDetailPageB2CCategoriesPreview() { } } -@Preview(uiMode = Configuration.UI_MODE_NIGHT_NO, showBackground = true) +@AdaptivePreviews @Composable private fun FeatureDetailPageB2BUnreadPreview() { ProtonTheme { @@ -259,7 +259,7 @@ private fun FeatureDetailPageB2BUnreadPreview() { } } -@Preview(uiMode = Configuration.UI_MODE_NIGHT_NO, showBackground = true) +@AdaptivePreviews @Composable private fun FeatureDetailPageB2BCategoriesPreview() { ProtonTheme { @@ -276,11 +276,7 @@ private fun FeatureDetailPageB2BCategoriesPreview() { } } -@Preview( - uiMode = Configuration.UI_MODE_NIGHT_NO, - showBackground = true, - device = "spec:width=891dp,height=411dp,orientation=landscape" -) +@AdaptivePreviews @Composable private fun DetailPageLandscapeContinuePreview() { ProtonTheme { @@ -297,11 +293,7 @@ private fun DetailPageLandscapeContinuePreview() { } } -@Preview( - uiMode = Configuration.UI_MODE_NIGHT_NO, - showBackground = true, - device = "spec:width=891dp,height=411dp,orientation=landscape" -) +@AdaptivePreviews @Composable private fun FeatureDetailPageLandscapeB2BLastPreview() { ProtonTheme { diff --git a/mail-spotlight/presentation/src/main/kotlin/ch/protonmail/android/mailspotlight/presentation/ui/SpotlightOverviewPage.kt b/mail-spotlight/presentation/src/main/kotlin/ch/protonmail/android/mailspotlight/presentation/ui/SpotlightOverviewPage.kt index abf269217d..543824a934 100644 --- a/mail-spotlight/presentation/src/main/kotlin/ch/protonmail/android/mailspotlight/presentation/ui/SpotlightOverviewPage.kt +++ b/mail-spotlight/presentation/src/main/kotlin/ch/protonmail/android/mailspotlight/presentation/ui/SpotlightOverviewPage.kt @@ -124,7 +124,7 @@ private fun PortraitOverviewPage( textAlign = TextAlign.Center ) - Spacer(modifier = Modifier.height(ProtonDimens.Spacing.Jumbo)) + Spacer(modifier = Modifier.height(ProtonDimens.Spacing.Huge)) FeatureCard(featureItems) @@ -230,7 +230,7 @@ private fun FeatureRow( .fillMaxWidth() .padding(ProtonDimens.Spacing.Large), horizontalArrangement = Arrangement.spacedBy(ProtonDimens.Spacing.Large), - verticalAlignment = Alignment.CenterVertically + verticalAlignment = Alignment.Top ) { Box( modifier = Modifier diff --git a/mail-spotlight/presentation/src/main/res/drawable/spotlight_celebration.webp b/mail-spotlight/presentation/src/main/res/drawable/spotlight_celebration.webp new file mode 100644 index 0000000000..76b9563e03 Binary files /dev/null and b/mail-spotlight/presentation/src/main/res/drawable/spotlight_celebration.webp differ diff --git a/presentation-compose/src/main/res/drawable/spotlight_celebration.xml b/presentation-compose/src/main/res/drawable/spotlight_celebration.xml deleted file mode 100644 index 52c909e070..0000000000 --- a/presentation-compose/src/main/res/drawable/spotlight_celebration.xml +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -