Skip to content

Commit d6328ce

Browse files
committed
...
1 parent c89e2a2 commit d6328ce

File tree

2 files changed

+4
-7
lines changed
  • demo/android/src/main/java/com/michaelflisar/composepreferences/demo/classes
  • library/core/src/commonMain/kotlin/com/michaelflisar/composepreferences/core/styles

2 files changed

+4
-7
lines changed

demo/android/src/main/java/com/michaelflisar/composepreferences/demo/classes/DemoPrefs.kt

+1-4
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,7 @@ object DemoPrefs : SettingsModel(DataStoreStorage.create(name = "demo1_prefs"))
7575
style = style ?: (data[6] as DemoStyle).let {
7676
when (it) {
7777
DemoStyle.Default -> DefaultStyle.create()
78-
DemoStyle.Modern -> ModernStyle.create(
79-
//sectionGroupItemBackgroundColor = MaterialTheme.colorScheme.surfaceContainerHighest,
80-
//sectionGroupItemForegroundColor = MaterialTheme.colorScheme.onSurface
81-
)
78+
DemoStyle.Modern -> ModernStyle.create()
8279
}
8380
},
8481
animationSpec = animationSpec

library/core/src/commonMain/kotlin/com/michaelflisar/composepreferences/core/styles/ModernStyle.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ class ModernStyle internal constructor(
5656
* @param spacing the spacing between preference items
5757
*/
5858
@Composable
59-
fun create(
59+
fun create(
6060
cornerSize: Dp = DEFAULT_CORNER_SIZE,
6161
backgroundColor: Color = MaterialTheme.colorScheme.background,
6262
foregroundColor: Color = MaterialTheme.colorScheme.onBackground,
6363
sectionBackgroundColor: Color = MaterialTheme.colorScheme.background,
6464
sectionForegroundColor: Color = MaterialTheme.colorScheme.primary,
65-
sectionGroupItemBackgroundColor: Color = MaterialTheme.colorScheme.primaryContainer,
66-
sectionGroupItemForegroundColor: Color = MaterialTheme.colorScheme.onPrimaryContainer,
65+
sectionGroupItemBackgroundColor: Color = MaterialTheme.colorScheme.surfaceContainerHighest,
66+
sectionGroupItemForegroundColor: Color = MaterialTheme.colorScheme.onSurface,
6767
alphaVariant: Float = PreferenceItemDefaults.DEFAULT_ALPHA_VARIANT,
6868
innerPadding: PaddingValues = PreferenceStyleDefaults.DEFAULT_INNER_PADDING,
6969
outerPadding: PaddingValues = DEFAULT_OUTER_PADDING,

0 commit comments

Comments
 (0)