From 605f734dfcfc22a492ff04e2db759cc577a95920 Mon Sep 17 00:00:00 2001 From: Gibran Chevalley Date: Thu, 19 Sep 2024 09:50:41 +0200 Subject: [PATCH 1/3] Fix top app bar font style --- .../swisstransfer/ui/components/SwissTransferTobAppBar.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTobAppBar.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTobAppBar.kt index 6818d6436..f5a2171a7 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTobAppBar.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTobAppBar.kt @@ -46,7 +46,7 @@ fun SwissTransferTobAppBar( actionIconContentColor = SwissTransferTheme.colors.toolbarIconColor, navigationIconContentColor = SwissTransferTheme.colors.toolbarIconColor, ), - title = { Text(stringResource(id = titleRes)) }, + title = { Text(stringResource(id = titleRes), style = SwissTransferTheme.typography.h2) }, navigationIcon = { navigationMenu?.let { MenuButton(navigationMenu) } }, actions = { actionMenus.forEach { actionMenu -> MenuButton(actionMenu) } }, ) From d99c018b068b0a073c9c74ba75a41c0d73c30e4d Mon Sep 17 00:00:00 2001 From: Gibran Chevalley Date: Thu, 19 Sep 2024 09:51:38 +0200 Subject: [PATCH 2/3] Fix disappearing back arrow in phone mode --- .../ui/screen/main/settings/components/OptionScaffold.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt index 2ae90d55d..784e98581 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt @@ -23,6 +23,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material3.Scaffold +import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteType import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableIntStateOf @@ -31,6 +32,7 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import com.infomaniak.swisstransfer.ui.components.SwissTransferTobAppBar import com.infomaniak.swisstransfer.ui.components.TopAppBarButton +import com.infomaniak.swisstransfer.ui.screen.main.LocalNavType @Composable fun OptionScaffold( @@ -42,7 +44,11 @@ fun OptionScaffold( navigateBack: (() -> Unit)? = null, ) { Scaffold(topBar = { - val canDisplayBackButton = navigateBack?.let { TopAppBarButton.backButton(navigateBack) } + val canDisplayBackButton = if (LocalNavType.current == NavigationSuiteType.NavigationBar) { + TopAppBarButton.backButton(navigateBack ?: {}) + } else { + null + } SwissTransferTobAppBar(topAppBarTitleRes, navigationMenu = canDisplayBackButton) }) { paddingsValue -> Column( From 45f7381b0e866156e98288f6eeb2ca512b730a98 Mon Sep 17 00:00:00 2001 From: Gibran Chevalley Date: Fri, 20 Sep 2024 09:19:53 +0200 Subject: [PATCH 3/3] Correctly name option scaffold top app bar navigation menu --- .../ui/screen/main/settings/components/OptionScaffold.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt index 784e98581..05054d13c 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt @@ -44,12 +44,12 @@ fun OptionScaffold( navigateBack: (() -> Unit)? = null, ) { Scaffold(topBar = { - val canDisplayBackButton = if (LocalNavType.current == NavigationSuiteType.NavigationBar) { + val backNavigationMenu = if (LocalNavType.current == NavigationSuiteType.NavigationBar) { TopAppBarButton.backButton(navigateBack ?: {}) } else { null } - SwissTransferTobAppBar(topAppBarTitleRes, navigationMenu = canDisplayBackButton) + SwissTransferTobAppBar(topAppBarTitleRes, navigationMenu = backNavigationMenu) }) { paddingsValue -> Column( modifier = Modifier