Fixes bottom bar look to match previous colors
This commit is contained in:
+9
-8
@@ -29,7 +29,6 @@ import androidx.compose.foundation.layout.Spacer
|
|||||||
import androidx.compose.foundation.layout.consumeWindowInsets
|
import androidx.compose.foundation.layout.consumeWindowInsets
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.size
|
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.material3.BottomAppBarDefaults.windowInsets
|
import androidx.compose.material3.BottomAppBarDefaults.windowInsets
|
||||||
import androidx.compose.material3.HorizontalDivider
|
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.screen.loggedIn.AccountViewModel
|
||||||
import com.vitorpamplona.amethyst.ui.stringRes
|
import com.vitorpamplona.amethyst.ui.stringRes
|
||||||
import com.vitorpamplona.amethyst.ui.theme.DividerThickness
|
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.Size0dp
|
||||||
import com.vitorpamplona.amethyst.ui.theme.Size10Modifier
|
import com.vitorpamplona.amethyst.ui.theme.Size10Modifier
|
||||||
import com.vitorpamplona.amethyst.ui.theme.Size24dp
|
import com.vitorpamplona.amethyst.ui.theme.Size25Modifier
|
||||||
import com.vitorpamplona.amethyst.ui.theme.Size27dp
|
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]),
|
/** 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
|
* exclusive of the system navigation-bar inset. Used by FAB callers that want to
|
||||||
@@ -110,6 +111,7 @@ private fun RenderBottomMenu(
|
|||||||
thickness = DividerThickness,
|
thickness = DividerThickness,
|
||||||
)
|
)
|
||||||
NavigationBar(
|
NavigationBar(
|
||||||
|
modifier = HorzPadding,
|
||||||
containerColor = MaterialTheme.colorScheme.background,
|
containerColor = MaterialTheme.colorScheme.background,
|
||||||
tonalElevation = Size0dp,
|
tonalElevation = Size0dp,
|
||||||
) {
|
) {
|
||||||
@@ -151,13 +153,12 @@ private fun NotifiableIcon(
|
|||||||
destination: Route,
|
destination: Route,
|
||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
) {
|
) {
|
||||||
Box(Modifier.size(Size27dp)) {
|
Box(Size27Modifier, contentAlignment = Alignment.Center) {
|
||||||
val iconSizeModifier = Modifier.size(Size24dp)
|
|
||||||
val description = stringRes(def.labelRes)
|
|
||||||
Icon(
|
Icon(
|
||||||
symbol = def.icon,
|
symbol = def.icon,
|
||||||
contentDescription = description,
|
contentDescription = stringRes(def.labelRes),
|
||||||
modifier = iconSizeModifier,
|
modifier = Size25Modifier,
|
||||||
|
tint = if (selected) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onSurface65,
|
||||||
)
|
)
|
||||||
|
|
||||||
AddNotifIconIfNeeded(destination, accountViewModel, Modifier.align(Alignment.TopEnd))
|
AddNotifIconIfNeeded(destination, accountViewModel, Modifier.align(Alignment.TopEnd))
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ val Size22Modifier = Modifier.size(22.dp)
|
|||||||
val Size24Modifier = Modifier.size(24.dp)
|
val Size24Modifier = Modifier.size(24.dp)
|
||||||
val Size25Modifier = Modifier.size(25.dp)
|
val Size25Modifier = Modifier.size(25.dp)
|
||||||
val Size26Modifier = Modifier.size(26.dp)
|
val Size26Modifier = Modifier.size(26.dp)
|
||||||
|
val Size27Modifier = Modifier.size(27.dp)
|
||||||
val Size28Modifier = Modifier.size(28.dp)
|
val Size28Modifier = Modifier.size(28.dp)
|
||||||
val Size30Modifier = Modifier.size(30.dp)
|
val Size30Modifier = Modifier.size(30.dp)
|
||||||
val Size35Modifier = Modifier.size(35.dp)
|
val Size35Modifier = Modifier.size(35.dp)
|
||||||
|
|||||||
@@ -107,6 +107,9 @@ private val LightMediumImportantLink = LightColorPalette.primary.copy(alpha = 0.
|
|||||||
private val DarkGrayText = DarkColorPalette.onSurface.copy(alpha = 0.52f)
|
private val DarkGrayText = DarkColorPalette.onSurface.copy(alpha = 0.52f)
|
||||||
private val LightGrayText = LightColorPalette.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 DarkPlaceholderText = DarkColorPalette.onSurface.copy(alpha = 0.42f)
|
||||||
private val LightPlaceholderText = LightColorPalette.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
|
val ColorScheme.grayText: Color
|
||||||
get() = if (isLight) LightGrayText else DarkGrayText
|
get() = if (isLight) LightGrayText else DarkGrayText
|
||||||
|
|
||||||
|
val ColorScheme.onSurface65: Color
|
||||||
|
get() = if (isLight) LightOnSurface65 else DarkOnSurface65
|
||||||
|
|
||||||
val ColorScheme.subtleBorder: Color
|
val ColorScheme.subtleBorder: Color
|
||||||
get() = if (isLight) LightSubtleBorder else DarkSubtleBorder
|
get() = if (isLight) LightSubtleBorder else DarkSubtleBorder
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user