manager: improve padding

This commit is contained in:
Rifat Azad
2025-06-29 18:50:04 +06:00
parent 2c71531533
commit a54c319d55

View File

@@ -100,13 +100,16 @@ fun HomeScreen(navigator: DestinationsNavigator) {
navigator.navigate(InstallScreenDestination) navigator.navigate(InstallScreenDestination)
} }
Row( if (ksuVersion != null && rootAvailable()) {
modifier = Modifier Row(
.fillMaxWidth(), modifier = Modifier
horizontalArrangement = Arrangement.spacedBy(12.dp) .fillMaxWidth()
) { .height(IntrinsicSize.Min),
Box(modifier = Modifier.weight(1f)) { SuperuserCard() } horizontalArrangement = Arrangement.spacedBy(14.dp)
Box(modifier = Modifier.weight(1f)) { ModuleCard() } ) {
Box(modifier = Modifier.weight(1f)) { SuperuserCard() }
Box(modifier = Modifier.weight(1f)) { ModuleCard() }
}
} }
if (isManager && Natives.requireNewKernel()) { if (isManager && Natives.requireNewKernel()) {
@@ -143,22 +146,26 @@ private fun SuperuserCard() {
containerColor = MaterialTheme.colorScheme.secondaryContainer containerColor = MaterialTheme.colorScheme.secondaryContainer
) )
) { ) {
Column( Box(
modifier = Modifier modifier = Modifier
.fillMaxSize() .fillMaxSize()
.padding(12.dp), .padding(16.dp),
verticalArrangement = Arrangement.Center, contentAlignment = Alignment.Center
horizontalAlignment = Alignment.CenterHorizontally
) { ) {
Text( Column(
text = stringResource(R.string.home_superuser_count), horizontalAlignment = Alignment.CenterHorizontally,
style = MaterialTheme.typography.bodySmall verticalArrangement = Arrangement.spacedBy(4.dp)
) ) {
Text( Text(
text = getSuperuserCount().toString(), text = stringResource(R.string.home_superuser_count),
style = MaterialTheme.typography.titleMedium, style = MaterialTheme.typography.bodySmall
fontWeight = FontWeight.SemiBold )
) Text(
text = getSuperuserCount().toString(),
style = MaterialTheme.typography.titleMedium,
fontWeight = FontWeight.SemiBold
)
}
} }
} }
} }
@@ -170,22 +177,26 @@ private fun ModuleCard() {
containerColor = MaterialTheme.colorScheme.secondaryContainer containerColor = MaterialTheme.colorScheme.secondaryContainer
) )
) { ) {
Column( Box(
modifier = Modifier modifier = Modifier
.fillMaxSize() .fillMaxSize()
.padding(12.dp), .padding(16.dp),
verticalArrangement = Arrangement.Center, contentAlignment = Alignment.Center
horizontalAlignment = Alignment.CenterHorizontally
) { ) {
Text( Column(
text = stringResource(R.string.home_module_count), horizontalAlignment = Alignment.CenterHorizontally,
style = MaterialTheme.typography.bodySmall verticalArrangement = Arrangement.spacedBy(4.dp)
) ) {
Text( Text(
text = getModuleCount().toString(), text = stringResource(R.string.home_module_count),
style = MaterialTheme.typography.titleMedium, style = MaterialTheme.typography.bodySmall
fontWeight = FontWeight.SemiBold )
) Text(
text = getModuleCount().toString(),
style = MaterialTheme.typography.titleMedium,
fontWeight = FontWeight.SemiBold
)
}
} }
} }
} }
@@ -549,7 +560,7 @@ private fun InfoCard(autoExpand: Boolean = false) {
Column( Column(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(start = 24.dp, top = 24.dp, end = 24.dp, bottom = 16.dp) .padding(start = 24.dp, top = 24.dp, end = 24.dp, bottom = 24.dp)
) { ) {
@Composable @Composable
fun InfoCardItem(label: String, content: String, icon: Any? = null) { fun InfoCardItem(label: String, content: String, icon: Any? = null) {
@@ -628,7 +639,7 @@ private fun InfoCard(autoExpand: Boolean = false) {
} }
if (!expanded) { if (!expanded) {
Spacer(Modifier.height(12.dp)) Spacer(Modifier.height(16.dp))
Row( Row(
modifier = Modifier modifier = Modifier
.fillMaxWidth(), .fillMaxWidth(),