diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/SideMenu.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/SideMenu.kt index 86f9df4..ff01842 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/SideMenu.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/SideMenu.kt @@ -116,7 +116,7 @@ fun SideMenu(appContent: @Composable () -> Unit) { Divider(color = Colors.DrawerDivider) Column(Modifier.padding(16.dp)) { - UiSettings(Modifier.fillMaxWidth().padding(bottom = VerticalSpacing)) + UiSettings(Modifier.fillMaxWidth().padding(bottom = VerticalSpacing), textColor) NavigationMenuItem(itemModifier, "Daten exportieren", textColor, horizontalPadding = ItemHorizontalPadding, icon = { Icon(Icons.AutoMirrored.Filled.Send, "Konto hinzufügen", Modifier.size(iconSize)) }) { coroutineScope.launch { diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/settings/UiSettings.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/settings/UiSettings.kt index 19399d9..07b7f20 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/settings/UiSettings.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/settings/UiSettings.kt @@ -5,11 +5,12 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color import net.codinux.banking.ui.config.DI import net.codinux.banking.ui.forms.BooleanOption @Composable -fun UiSettings(modifier: Modifier) { +fun UiSettings(modifier: Modifier, textColor: Color = Color.Unspecified) { val uiSettings = DI.uiSettings val groupTransactions by uiSettings.groupTransactions.collectAsState() @@ -20,11 +21,11 @@ fun UiSettings(modifier: Modifier) { Column(modifier) { - BooleanOption("Umsätze gruppieren", groupTransactions) { uiSettings.groupTransactions.value = it } + BooleanOption("Umsätze gruppieren", groupTransactions, textColor = textColor) { uiSettings.groupTransactions.value = it } - BooleanOption("Zebra Stripes", zebraStripes) { uiSettings.zebraStripes.value = it } + BooleanOption("Zebra Stripes", zebraStripes, textColor = textColor) { uiSettings.zebraStripes.value = it } - BooleanOption("Bank Icons anzeigen", showBankIcons) { uiSettings.showBankIcons.value = it } + BooleanOption("Bank Icons anzeigen", showBankIcons, textColor = textColor) { uiSettings.showBankIcons.value = it } } } \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/BooleanOption.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/BooleanOption.kt index 03dbc2c..fadb216 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/BooleanOption.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/BooleanOption.kt @@ -10,16 +10,17 @@ import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import net.codinux.banking.ui.config.Colors @Composable -fun BooleanOption(label: String, isChecked: Boolean, enabled: Boolean = true, checkChanged: (Boolean) -> Unit) { +fun BooleanOption(label: String, isChecked: Boolean, enabled: Boolean = true, textColor: Color = Color.Unspecified, checkChanged: (Boolean) -> Unit) { Row(verticalAlignment = Alignment.CenterVertically) { Switch(checked = isChecked, onCheckedChange = checkChanged, enabled = enabled, colors = SwitchDefaults.colors(checkedThumbColor = Colors.CodinuxSecondaryColor)) - Text(label, Modifier.fillMaxWidth().clickable { checkChanged(!!!isChecked) }.padding(start = 6.dp)) + Text(label, Modifier.fillMaxWidth().clickable { checkChanged(!!!isChecked) }.padding(start = 6.dp), color = textColor) } } \ No newline at end of file