commit 6f952528ef7645c497123dcfc968896e06e8205c parent 0f323f52757b3ecc1c4e99b5994d74a6f347f4b6 Author: Gabriel Luong <gabriel.luong@gmail.com> Date: Tue, 18 Nov 2025 23:32:37 +0000 Bug 1993856 - Part 4: Align the Shortcuts screen with the M3 Acorn Specs r=android-reviewers,007 Top app bar: https://www.figma.com/design/MjufE1X5fvkxZ0YneX4kRd/Android-Library--2025-?node-id=63923-29107&m=dev Shortcuts screen: https://www.figma.com/design/NSjxxopvFmRFu0m61T1N4E/HNT-Android-2025?node-id=16639-55425&m=dev Differential Revision: https://phabricator.services.mozilla.com/D268821 Diffstat:
2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/topsites/ui/Shortcuts.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/topsites/ui/Shortcuts.kt @@ -4,12 +4,11 @@ package org.mozilla.fenix.home.topsites.ui -import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.grid.GridCells import androidx.compose.foundation.lazy.grid.LazyVerticalGrid +import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp @@ -22,7 +21,6 @@ import org.mozilla.fenix.home.topsites.TopSiteItem import org.mozilla.fenix.home.topsites.getMenuItems import org.mozilla.fenix.home.topsites.interactor.TopSiteInteractor import org.mozilla.fenix.theme.FirefoxTheme -import kotlin.collections.forEachIndexed @Composable internal fun Shortcuts( @@ -69,7 +67,7 @@ internal fun Shortcuts( @FlexibleWindowLightDarkPreview private fun ShortcutsPreview() { FirefoxTheme { - Box(modifier = Modifier.background(color = FirefoxTheme.colors.layer1).padding(16.dp)) { + Surface { Shortcuts( topSites = FakeHomepagePreview.topSites(), interactor = FakeHomepagePreview.topSitesInteractor, diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/topsites/ui/ShortcutsScreen.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/topsites/ui/ShortcutsScreen.kt @@ -7,16 +7,13 @@ package org.mozilla.fenix.home.topsites.ui import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.WindowInsets -import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.padding import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TopAppBar -import androidx.compose.material3.TopAppBarDefaults import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.Alignment @@ -25,6 +22,7 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import mozilla.components.compose.base.annotation.FlexibleWindowLightDarkPreview +import mozilla.components.compose.base.button.IconButton import mozilla.components.compose.base.utils.BackInvokedHandler import org.mozilla.fenix.R import org.mozilla.fenix.home.fake.FakeHomepagePreview @@ -57,17 +55,17 @@ fun ShortcutsScreen( title = { Text( text = stringResource(R.string.homepage_shortcuts_title), - color = FirefoxTheme.colors.textPrimary, - style = FirefoxTheme.typography.headline6, + style = FirefoxTheme.typography.headline5, ) }, - modifier = Modifier.fillMaxWidth(), navigationIcon = { - IconButton(onClick = onNavigationIconClick) { + IconButton( + onClick = onNavigationIconClick, + contentDescription = "", + ) { Icon( painter = painterResource(iconsR.drawable.mozac_ic_back_24), contentDescription = "", - tint = FirefoxTheme.colors.iconPrimary, ) } }, @@ -75,10 +73,8 @@ fun ShortcutsScreen( top = 0.dp, bottom = 0.dp, ), - colors = TopAppBarDefaults.topAppBarColors(containerColor = FirefoxTheme.colors.layer1), ) }, - containerColor = FirefoxTheme.colors.layer1, ) { paddingValues -> ShortcutsScreenContent( state = state,