diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/bottombars/AppBottomBar.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/bottombars/AppBottomBar.kt index 9f809abd79..14b5ddcd52 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/bottombars/AppBottomBar.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/bottombars/AppBottomBar.kt @@ -29,7 +29,6 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.material3.BottomAppBarDefaults.windowInsets import androidx.compose.material3.HorizontalDivider @@ -49,10 +48,12 @@ import com.vitorpamplona.amethyst.ui.navigation.routes.Route import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.amethyst.ui.stringRes import com.vitorpamplona.amethyst.ui.theme.DividerThickness +import com.vitorpamplona.amethyst.ui.theme.HorzPadding import com.vitorpamplona.amethyst.ui.theme.Size0dp import com.vitorpamplona.amethyst.ui.theme.Size10Modifier -import com.vitorpamplona.amethyst.ui.theme.Size24dp -import com.vitorpamplona.amethyst.ui.theme.Size27dp +import com.vitorpamplona.amethyst.ui.theme.Size25Modifier +import com.vitorpamplona.amethyst.ui.theme.Size27Modifier +import com.vitorpamplona.amethyst.ui.theme.onSurface65 /** Content height of the [AppBottomBar] (the 50.dp Column inside [RenderBottomMenu]), * exclusive of the system navigation-bar inset. Used by FAB callers that want to @@ -110,6 +111,7 @@ private fun RenderBottomMenu( thickness = DividerThickness, ) NavigationBar( + modifier = HorzPadding, containerColor = MaterialTheme.colorScheme.background, tonalElevation = Size0dp, ) { @@ -151,13 +153,12 @@ private fun NotifiableIcon( destination: Route, accountViewModel: AccountViewModel, ) { - Box(Modifier.size(Size27dp)) { - val iconSizeModifier = Modifier.size(Size24dp) - val description = stringRes(def.labelRes) + Box(Size27Modifier, contentAlignment = Alignment.Center) { Icon( symbol = def.icon, - contentDescription = description, - modifier = iconSizeModifier, + contentDescription = stringRes(def.labelRes), + modifier = Size25Modifier, + tint = if (selected) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onSurface65, ) AddNotifIconIfNeeded(destination, accountViewModel, Modifier.align(Alignment.TopEnd)) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt index e1c01e032c..ec9fc62172 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt @@ -176,6 +176,7 @@ val Size22Modifier = Modifier.size(22.dp) val Size24Modifier = Modifier.size(24.dp) val Size25Modifier = Modifier.size(25.dp) val Size26Modifier = Modifier.size(26.dp) +val Size27Modifier = Modifier.size(27.dp) val Size28Modifier = Modifier.size(28.dp) val Size30Modifier = Modifier.size(30.dp) val Size35Modifier = Modifier.size(35.dp) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Theme.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Theme.kt index d6c4ebf26d..213d04d4e6 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Theme.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Theme.kt @@ -107,6 +107,9 @@ private val LightMediumImportantLink = LightColorPalette.primary.copy(alpha = 0. private val DarkGrayText = DarkColorPalette.onSurface.copy(alpha = 0.52f) private val LightGrayText = LightColorPalette.onSurface.copy(alpha = 0.52f) +private val DarkOnSurface65 = DarkColorPalette.onSurface.copy(alpha = 0.65f).compositeOver(DarkColorPalette.surface) +private val LightOnSurface65 = LightColorPalette.onSurface.copy(alpha = 0.65f).compositeOver(LightColorPalette.surface) + private val DarkPlaceholderText = DarkColorPalette.onSurface.copy(alpha = 0.42f) private val LightPlaceholderText = LightColorPalette.onSurface.copy(alpha = 0.42f) @@ -437,6 +440,9 @@ val ColorScheme.onBackgroundColorFilter: ColorFilter val ColorScheme.grayText: Color get() = if (isLight) LightGrayText else DarkGrayText +val ColorScheme.onSurface65: Color + get() = if (isLight) LightOnSurface65 else DarkOnSurface65 + val ColorScheme.subtleBorder: Color get() = if (isLight) LightSubtleBorder else DarkSubtleBorder