fix ui discrepancies and text color for language
This commit is contained in:
parent
481a8a8297
commit
9976b836e8
3 changed files with 7 additions and 4 deletions
|
@ -116,7 +116,7 @@ fun SettingsScreen(
|
|||
preferenceTitle = stringResource(id = R.string.customize_widget_colors),
|
||||
doOnPreferenceClick = customizeWidgetColors
|
||||
)
|
||||
Spacer(modifier = Modifier.padding(bottom = 16.dp))
|
||||
Spacer(modifier = Modifier.padding(bottom = 8.dp))
|
||||
}
|
||||
Divider()
|
||||
SettingsGroup(title = {
|
||||
|
@ -136,7 +136,8 @@ fun SettingsScreen(
|
|||
SettingsPreferenceComponent(
|
||||
preferenceTitle = stringResource(id = R.string.language),
|
||||
preferenceSummary = displayLanguage,
|
||||
doOnPreferenceClick = onSetupLanguagePress
|
||||
doOnPreferenceClick = onSetupLanguagePress,
|
||||
preferenceSummaryColor = MaterialTheme.colorScheme.onSurface
|
||||
)
|
||||
}
|
||||
SettingsCheckBoxComponent(
|
||||
|
|
|
@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.padding
|
|||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
@ -25,6 +26,7 @@ fun SettingsPreferenceComponent(
|
|||
isPreferenceEnabled: Boolean = true,
|
||||
doOnPreferenceLongClick: (() -> Unit)? = null,
|
||||
doOnPreferenceClick: (() -> Unit)? = null,
|
||||
preferenceSummaryColor: Color = preferenceSummaryColor(isEnabled = isPreferenceEnabled)
|
||||
) {
|
||||
Column(
|
||||
modifier = modifier
|
||||
|
@ -47,7 +49,7 @@ fun SettingsPreferenceComponent(
|
|||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 4.dp),
|
||||
color = preferenceSummaryColor(isEnabled = isPreferenceEnabled),
|
||||
color = preferenceSummaryColor.copy(alpha = 0.6f),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ fun SettingsTitleTextComponent(
|
|||
modifier: Modifier = Modifier,
|
||||
text: String,
|
||||
) {
|
||||
Box(modifier = Modifier.padding(top = 24.dp, bottom = 8.dp)) {
|
||||
Box(modifier = Modifier.padding(top = 16.dp, bottom = 8.dp)) {
|
||||
Text(
|
||||
text = text.uppercase(),
|
||||
modifier = modifier,
|
||||
|
|
Loading…
Reference in a new issue