Change Toolbar to use surfaceContainer

The drawer is not drawn behind the status bar anymore, we need a design decision if it's needed.
This commit is contained in:
Wolf-Martell Montwé 2024-04-29 17:10:02 +02:00
parent fafb40df20
commit a94b10014f
No known key found for this signature in database
GPG key ID: 6D45B21512ACBF72
3 changed files with 16 additions and 0 deletions

View file

@ -5,13 +5,16 @@
<item name="android:textSize">15sp</item>
<item name="android:textColor">#aaa</item>
</style>
<style name="ComposeEditText" parent="@android:style/TextAppearance.Medium">
<item name="android:textSize">16sp</item>
<item name="android:textColorHint">#aaa</item>
</style>
<style name="RecipientEditText" parent="ComposeEditText">
<item name="android:lineSpacingExtra">4dp</item>
</style>
<style name="ComposeEditTextLarge" parent="@android:style/TextAppearance.Medium">
<item name="android:textColorHint">#aaa</item>
</style>
@ -42,6 +45,10 @@
<item name="android:textColor">?android:attr/textColorHint</item>
</style>
<style name="Widget.App.Toolbar" parent="Widget.Material3.Toolbar">
<item name="android:background">?attr/colorSurfaceContainer</item>
</style>
<style name="Widget.MaterialDrawerStyle.K9" parent="Widget.MaterialDrawerStyle">
<item name="materialDrawerBackground">?android:colorBackground</item>
<item name="materialDrawerPrimaryText">?android:textColorPrimary</item>

View file

@ -58,6 +58,8 @@
<item name="colorErrorContainer">@color/k9_error_090</item>
<item name="colorOnErrorContainer">@color/k9_error_010</item>
<item name="toolbarStyle">@style/Widget.App.Toolbar</item>
<!-- Legacy styles -->
<item name="windowActionModeOverlay">true</item>
@ -258,6 +260,8 @@
<item name="colorErrorContainer">@color/k9_error_030</item>
<item name="colorOnErrorContainer">@color/k9_error_090</item>
<item name="toolbarStyle">@style/Widget.App.Toolbar</item>
<!-- Legacy styles -->
<item name="windowActionModeOverlay">true</item>

View file

@ -2,11 +2,13 @@ package app.k9mail.core.ui.compose.designsystem.organism
import androidx.compose.foundation.layout.RowScope
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.TopAppBarDefaults.topAppBarColors
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import app.k9mail.core.ui.compose.designsystem.atom.button.ButtonIcon
import app.k9mail.core.ui.compose.designsystem.atom.icon.Icons
import app.k9mail.core.ui.compose.designsystem.atom.text.TextTitleLarge
import app.k9mail.core.ui.compose.theme2.MainTheme
import androidx.compose.material3.TopAppBar as Material3TopAppBar
@OptIn(ExperimentalMaterial3Api::class)
@ -22,6 +24,9 @@ fun TopAppBar(
modifier = modifier,
navigationIcon = navigationIcon,
actions = actions,
colors = topAppBarColors(
containerColor = MainTheme.colors.surfaceContainer,
),
)
}