feat: Update status and navigation bar colors to match background; add version text to bottom of ChatsListScreen
This commit is contained in:
@@ -159,8 +159,8 @@ fun ChatsListScreen(
|
||||
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
// Update status bar and hide navigation bar completely
|
||||
LaunchedEffect(isDarkTheme, drawerState.isOpen) {
|
||||
// Update status bar and navigation bar colors to match background
|
||||
LaunchedEffect(isDarkTheme) {
|
||||
if (!view.isInEditMode) {
|
||||
val window = (view.context as android.app.Activity).window
|
||||
val insetsController = androidx.core.view.WindowCompat.getInsetsController(window, view)
|
||||
@@ -169,9 +169,10 @@ fun ChatsListScreen(
|
||||
insetsController.isAppearanceLightStatusBars = !isDarkTheme
|
||||
window.statusBarColor = android.graphics.Color.TRANSPARENT
|
||||
|
||||
// Hide navigation bar completely
|
||||
insetsController.hide(androidx.core.view.WindowInsetsCompat.Type.navigationBars())
|
||||
insetsController.systemBarsBehavior = androidx.core.view.WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
||||
// Navigation bar - match background color
|
||||
val navBarColor = if (isDarkTheme) 0xFF1A1A1A.toInt() else 0xFFFFFFFF.toInt()
|
||||
window.navigationBarColor = navBarColor
|
||||
insetsController.isAppearanceLightNavigationBars = !isDarkTheme
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,8 +458,21 @@ fun ChatsListScreen(
|
||||
)
|
||||
}
|
||||
|
||||
// Bottom spacer for navigation bar area (content padding only)
|
||||
Spacer(modifier = Modifier.height(48.dp))
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
// Version text at the bottom
|
||||
Text(
|
||||
text = "Rosetta v1.0.0",
|
||||
fontSize = 12.sp,
|
||||
color = secondaryTextColor.copy(alpha = 0.5f),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp),
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
|
||||
// Bottom spacer for navigation bar area
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
}
|
||||
}
|
||||
) {
|
||||
@@ -685,7 +699,10 @@ fun ChatsListScreen(
|
||||
},
|
||||
colors = TopAppBarDefaults.topAppBarColors(
|
||||
containerColor = backgroundColor,
|
||||
titleContentColor = textColor
|
||||
scrolledContainerColor = backgroundColor,
|
||||
navigationIconContentColor = textColor,
|
||||
titleContentColor = textColor,
|
||||
actionIconContentColor = textColor
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user