refactor: apply mr feedback
This commit is contained in:
parent
d280f40c87
commit
0000ecc50c
|
@ -46,7 +46,11 @@ fun SettingsCheckBoxComponent(
|
|||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
.clickable(onClick = { onChange?.invoke(!initialValue) }, interactionSource = interactionSource, indication = indication)
|
||||
.clickable(
|
||||
onClick = { onChange?.invoke(!initialValue) },
|
||||
interactionSource = interactionSource,
|
||||
indication = indication
|
||||
)
|
||||
.padding(horizontal = 16.dp, vertical = 6.dp),
|
||||
) {
|
||||
Column(
|
||||
|
@ -77,7 +81,10 @@ fun SettingsCheckBoxComponent(
|
|||
checked = initialValue,
|
||||
onCheckedChange = { onChange?.invoke(it) },
|
||||
enabled = isPreferenceEnabled,
|
||||
colors = CheckboxDefaults.colors(checkedColor = checkboxColor, checkmarkColor = MaterialTheme.colorScheme.surface),
|
||||
colors = CheckboxDefaults.colors(
|
||||
checkedColor = checkboxColor,
|
||||
checkmarkColor = MaterialTheme.colorScheme.surface
|
||||
),
|
||||
interactionSource = interactionSource
|
||||
)
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
|||
import com.simplemobiletools.calculator.compose.theme.model.Theme
|
||||
import com.simplemobiletools.calculator.compose.theme.model.Theme.Companion.systemDefaultMaterialYou
|
||||
import com.simplemobiletools.calculator.extensions.config
|
||||
import com.simplemobiletools.commons.helpers.isSPlus
|
||||
|
||||
@Composable
|
||||
internal fun Theme(
|
||||
|
@ -30,7 +31,7 @@ internal fun Theme(
|
|||
val colorScheme = if (!view.isInEditMode) {
|
||||
|
||||
val colorScheme = when {
|
||||
theme is Theme.SystemDefaultMaterialYou && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
|
||||
theme is Theme.SystemDefaultMaterialYou && isSPlus() -> {
|
||||
if (isSystemInDarkTheme()) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
|
||||
}
|
||||
|
||||
|
@ -58,7 +59,9 @@ internal fun Theme(
|
|||
|
||||
colorScheme
|
||||
|
||||
} else darkColorScheme
|
||||
} else {
|
||||
darkColorScheme
|
||||
}
|
||||
|
||||
SideEffect {
|
||||
systemUiController.setNavigationBarColor(colorScheme.surface, navigationBarContrastEnforced = false)
|
||||
|
|
Loading…
Reference in New Issue