fix: customize colors locked color

This commit is contained in:
FunkyMuse 2023-09-29 10:31:12 +02:00
parent b1b66ad5a7
commit cfbd2d5399
2 changed files with 16 additions and 15 deletions

View File

@ -40,12 +40,13 @@ internal fun SettingsScreen(
SettingsTitleTextComponent(text = stringResource(id = R.string.color_customization))
}) {
SettingsPreferenceComponent(
preferenceTitle = lockedCustomizeColorText,
label = lockedCustomizeColorText,
doOnPreferenceClick = customizeColors,
isPreferenceEnabled = isOrWasThankYouInstalled,
preferenceLabelColor = MaterialTheme.colorScheme.onSurface
)
SettingsPreferenceComponent(
preferenceTitle = stringResource(id = R.string.customize_widget_colors),
label = stringResource(id = R.string.customize_widget_colors),
doOnPreferenceClick = customizeWidgetColors
)
}
@ -55,37 +56,37 @@ internal fun SettingsScreen(
}) {
if (!isOrWasThankYouInstalled) {
SettingsPreferenceComponent(
preferenceTitle = stringResource(id = R.string.purchase_simple_thank_you),
label = stringResource(id = R.string.purchase_simple_thank_you),
doOnPreferenceClick = onThankYou,
)
}
if (isUseEnglishEnabled) {
SettingsCheckBoxComponent(
title = stringResource(id = R.string.use_english_language),
label = stringResource(id = R.string.use_english_language),
initialValue = isUseEnglishChecked,
onChange = onUseEnglishPress,
)
}
if (isTiramisuPlus()) {
SettingsPreferenceComponent(
preferenceTitle = stringResource(id = R.string.language),
preferenceSummary = displayLanguage,
label = stringResource(id = R.string.language),
value = displayLanguage,
doOnPreferenceClick = onSetupLanguagePress,
preferenceSummaryColor = MaterialTheme.colorScheme.onSurface,
preferenceValueColor = MaterialTheme.colorScheme.onSurface,
)
}
SettingsCheckBoxComponent(
title = stringResource(id = R.string.vibrate_on_button_press),
label = stringResource(id = R.string.vibrate_on_button_press),
initialValue = vibrateOnButtonPressFlow,
onChange = onVibrateOnButtonPressFlow,
)
SettingsCheckBoxComponent(
title = stringResource(id = R.string.prevent_phone_from_sleeping),
label = stringResource(id = R.string.prevent_phone_from_sleeping),
initialValue = preventPhoneFromSleeping,
onChange = onPreventPhoneFromSleeping,
)
SettingsCheckBoxComponent(
title = stringResource(id = com.simplemobiletools.calculator.R.string.use_comma_as_decimal_mark),
label = stringResource(id = com.simplemobiletools.calculator.R.string.use_comma_as_decimal_mark),
initialValue = useCommaAsDecimalMarkFlow,
onChange = onUseCommaAsDecimalMarkFlow,
)

View File

@ -8,10 +8,10 @@ androidx-customView = "1.2.0-alpha02"
androidx-customViewPooling = "1.0.0"
androidx-lifecycle = "2.7.0-alpha02"
#Compose
composeActivity = "1.8.0-beta01"
compose = "1.6.0-alpha05"
composeActivity = "1.8.0-rc01"
compose = "1.6.0-alpha06"
composeCompiler = "1.5.3"
composeMaterial3 = "1.2.0-alpha07"
composeMaterial3 = "1.2.0-alpha08"
accompanist = "0.33.1-alpha"
#AutoFitTextView
autofittextview = "0.2.1"
@ -20,9 +20,9 @@ exp4j = "0.4.8"
#Room
room = "2.5.2"
#Simple tools
simple-commons = "fd7f0ed81f"
simple-commons = "5df1c152c5"
#Gradle
gradlePlugins-agp = "8.1.1"
gradlePlugins-agp = "8.1.2"
#build
app-build-compileSDKVersion = "34"
app-build-targetSDK = "34"