Opt Flash and Install interface button elements, adjust colors and dialog box styles
This commit is contained in:
@@ -122,6 +122,7 @@ fun FlashScreen(navigator: DestinationsNavigator, flashIt: FlashIt) {
|
|||||||
},
|
},
|
||||||
floatingActionButton = {
|
floatingActionButton = {
|
||||||
if (showFloatAction) {
|
if (showFloatAction) {
|
||||||
|
val cardColor = MaterialTheme.colorScheme.secondaryContainer
|
||||||
val reboot = stringResource(id = R.string.reboot)
|
val reboot = stringResource(id = R.string.reboot)
|
||||||
ExtendedFloatingActionButton(
|
ExtendedFloatingActionButton(
|
||||||
onClick = {
|
onClick = {
|
||||||
@@ -133,6 +134,8 @@ fun FlashScreen(navigator: DestinationsNavigator, flashIt: FlashIt) {
|
|||||||
},
|
},
|
||||||
icon = { Icon(Icons.Filled.Refresh, reboot) },
|
icon = { Icon(Icons.Filled.Refresh, reboot) },
|
||||||
text = { Text(text = reboot) },
|
text = { Text(text = reboot) },
|
||||||
|
containerColor = cardColor.copy(alpha = 1f),
|
||||||
|
contentColor = MaterialTheme.colorScheme.onSecondaryContainer
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import androidx.compose.ui.res.stringResource
|
|||||||
import androidx.compose.ui.semantics.Role
|
import androidx.compose.ui.semantics.Role
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.compose.ui.window.DialogProperties
|
||||||
import androidx.documentfile.provider.DocumentFile
|
import androidx.documentfile.provider.DocumentFile
|
||||||
import com.maxkeppeker.sheets.core.models.base.Header
|
import com.maxkeppeker.sheets.core.models.base.Header
|
||||||
import com.maxkeppeker.sheets.core.models.base.rememberUseCaseState
|
import com.maxkeppeker.sheets.core.models.base.rememberUseCaseState
|
||||||
@@ -515,18 +516,32 @@ fun rememberSelectKmiDialog(onSelected: (String?) -> Unit): DialogHandle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var selection by remember { mutableStateOf<String?>(null) }
|
var selection by remember { mutableStateOf<String?>(null) }
|
||||||
ListDialog(state = rememberUseCaseState(visible = true, onFinishedRequest = {
|
Surface(
|
||||||
onSelected(selection)
|
color = MaterialTheme.colorScheme.secondaryContainer,
|
||||||
}, onCloseRequest = {
|
contentColor = MaterialTheme.colorScheme.onSecondaryContainer,
|
||||||
dismiss()
|
shape = MaterialTheme.shapes.medium
|
||||||
}), header = Header.Default(
|
) {
|
||||||
title = stringResource(R.string.select_kmi),
|
ListDialog(
|
||||||
), selection = ListSelection.Single(
|
state = rememberUseCaseState(
|
||||||
showRadioButtons = true,
|
visible = true,
|
||||||
options = options,
|
onFinishedRequest = {
|
||||||
) { _, option ->
|
onSelected(selection)
|
||||||
selection = option.titleText
|
},
|
||||||
})
|
onCloseRequest = {
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
),
|
||||||
|
header = Header.Default(
|
||||||
|
title = stringResource(R.string.select_kmi),
|
||||||
|
),
|
||||||
|
selection = ListSelection.Single(
|
||||||
|
showRadioButtons = true,
|
||||||
|
options = options,
|
||||||
|
) { _, option ->
|
||||||
|
selection = option.titleText
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,9 +111,7 @@ import shirkneko.zako.sukisu.ui.viewmodel.ModuleViewModel
|
|||||||
import java.io.BufferedReader
|
import java.io.BufferedReader
|
||||||
import java.io.InputStreamReader
|
import java.io.InputStreamReader
|
||||||
import java.util.zip.ZipInputStream
|
import java.util.zip.ZipInputStream
|
||||||
import androidx.compose.material3.FloatingActionButtonDefaults
|
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import shirkneko.zako.sukisu.ui.theme.CardConfig
|
|
||||||
|
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
|
|||||||
Reference in New Issue
Block a user