mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-06 09:31:04 +02:00
Version Badge added
This commit is contained in:
@@ -93,6 +93,17 @@ class HomeViews {
|
|||||||
const val ListImageSize = 150
|
const val ListImageSize = 150
|
||||||
const val GridImageSize = 300
|
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)
|
@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun Home(
|
fun Home(
|
||||||
@@ -125,6 +136,8 @@ class HomeViews {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- Box around scaffold so we can overlay the badge
|
||||||
|
Box(Modifier.fillMaxSize()) {
|
||||||
Scaffold(
|
Scaffold(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
topBar = {
|
topBar = {
|
||||||
@@ -482,6 +495,12 @@ class HomeViews {
|
|||||||
selectedModel.value = null
|
selectedModel.value = null
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// --- Version badge bottom left above the entire content
|
||||||
|
VersionBadge(
|
||||||
|
modifier = Modifier.align(Alignment.BottomStart)
|
||||||
|
)
|
||||||
|
} // End of box
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalFoundationApi::class)
|
@OptIn(ExperimentalFoundationApi::class)
|
||||||
|
|||||||
Reference in New Issue
Block a user