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 drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
|
||||||
val scope = rememberCoroutineScope()
|
val scope = rememberCoroutineScope()
|
||||||
|
|
||||||
// Update status bar and hide navigation bar completely
|
// Update status bar and navigation bar colors to match background
|
||||||
LaunchedEffect(isDarkTheme, drawerState.isOpen) {
|
LaunchedEffect(isDarkTheme) {
|
||||||
if (!view.isInEditMode) {
|
if (!view.isInEditMode) {
|
||||||
val window = (view.context as android.app.Activity).window
|
val window = (view.context as android.app.Activity).window
|
||||||
val insetsController = androidx.core.view.WindowCompat.getInsetsController(window, view)
|
val insetsController = androidx.core.view.WindowCompat.getInsetsController(window, view)
|
||||||
@@ -169,9 +169,10 @@ fun ChatsListScreen(
|
|||||||
insetsController.isAppearanceLightStatusBars = !isDarkTheme
|
insetsController.isAppearanceLightStatusBars = !isDarkTheme
|
||||||
window.statusBarColor = android.graphics.Color.TRANSPARENT
|
window.statusBarColor = android.graphics.Color.TRANSPARENT
|
||||||
|
|
||||||
// Hide navigation bar completely
|
// Navigation bar - match background color
|
||||||
insetsController.hide(androidx.core.view.WindowInsetsCompat.Type.navigationBars())
|
val navBarColor = if (isDarkTheme) 0xFF1A1A1A.toInt() else 0xFFFFFFFF.toInt()
|
||||||
insetsController.systemBarsBehavior = androidx.core.view.WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
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(16.dp))
|
||||||
Spacer(modifier = Modifier.height(48.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(
|
colors = TopAppBarDefaults.topAppBarColors(
|
||||||
containerColor = backgroundColor,
|
containerColor = backgroundColor,
|
||||||
titleContentColor = textColor
|
scrolledContainerColor = backgroundColor,
|
||||||
|
navigationIconContentColor = textColor,
|
||||||
|
titleContentColor = textColor,
|
||||||
|
actionIconContentColor = textColor
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user