add ability to drive custom preferenceTitleColor
This commit is contained in:
parent
5c72430a0d
commit
f1d66aacbd
1 changed files with 4 additions and 3 deletions
|
@ -17,7 +17,7 @@ import androidx.compose.ui.unit.dp
|
|||
import com.simplemobiletools.commons.R
|
||||
import com.simplemobiletools.commons.compose.extensions.MyDevices
|
||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||
import com.simplemobiletools.commons.compose.theme.preferenceSummaryColorWithAlpha
|
||||
import com.simplemobiletools.commons.compose.theme.preferenceSummaryColor
|
||||
import com.simplemobiletools.commons.compose.theme.preferenceTitleColor
|
||||
|
||||
@Composable
|
||||
|
@ -28,7 +28,8 @@ fun SettingsPreferenceComponent(
|
|||
isPreferenceEnabled: Boolean = true,
|
||||
doOnPreferenceLongClick: (() -> Unit)? = null,
|
||||
doOnPreferenceClick: (() -> Unit)? = null,
|
||||
preferenceSummaryColor: Color = preferenceSummaryColorWithAlpha(isEnabled = isPreferenceEnabled)
|
||||
preferenceSummaryColor: Color = preferenceSummaryColor(isEnabled = isPreferenceEnabled),
|
||||
preferenceTitleColor: Color = preferenceTitleColor(isEnabled = isPreferenceEnabled)
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
|
@ -45,7 +46,7 @@ fun SettingsPreferenceComponent(
|
|||
Text(
|
||||
text = preferenceTitle,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
color = preferenceTitleColor(isEnabled = isPreferenceEnabled),
|
||||
color = preferenceTitleColor,
|
||||
fontSize = with(LocalDensity.current) {
|
||||
dimensionResource(id = R.dimen.normal_text_size).toSp()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue