mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-10 19:41:05 +02:00
Version Badge added
This commit is contained in:
@@ -93,6 +93,17 @@ class HomeViews {
|
||||
const val ListImageSize = 150
|
||||
const val GridImageSize = 300
|
||||
|
||||
// --- small version badge bottom left
|
||||
@Composable
|
||||
private fun VersionBadge(modifier: Modifier = Modifier) {
|
||||
Text(
|
||||
text = "v" + org.kenjinx.android.BuildConfig.VERSION_NAME,
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.6f),
|
||||
modifier = modifier.padding(8.dp)
|
||||
)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class)
|
||||
@Composable
|
||||
fun Home(
|
||||
@@ -125,6 +136,8 @@ class HomeViews {
|
||||
}
|
||||
}
|
||||
|
||||
// --- Box around scaffold so we can overlay the badge
|
||||
Box(Modifier.fillMaxSize()) {
|
||||
Scaffold(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
topBar = {
|
||||
@@ -482,6 +495,12 @@ class HomeViews {
|
||||
selectedModel.value = null
|
||||
}
|
||||
)
|
||||
|
||||
// --- Version badge bottom left above the entire content
|
||||
VersionBadge(
|
||||
modifier = Modifier.align(Alignment.BottomStart)
|
||||
)
|
||||
} // End of box
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalFoundationApi::class)
|
||||
|
||||
Reference in New Issue
Block a user