mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-15 10:37:04 +00:00
Version Badge added
This commit is contained in:
parent
7cc28d0242
commit
d73d82fbc0
1 changed files with 331 additions and 312 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue