diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/settings/SettingsAppearanceScreen.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/settings/SettingsAppearanceScreen.kt index f18dd7fe..9cffa5fc 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/settings/SettingsAppearanceScreen.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/settings/SettingsAppearanceScreen.kt @@ -164,7 +164,7 @@ fun SettingsAppearanceScreenContent( WindowInsets.navigationBars.only( WindowInsetsSides.Bottom ) - ).asPaddingValues(), + ).asPaddingValues() ) { item { ChoicePreference( @@ -187,18 +187,18 @@ fun SettingsAppearanceScreenContent( .animateContentSize() .padding(vertical = 8.dp), contentPadding = PaddingValues(horizontal = 8.dp), - horizontalArrangement = Arrangement.spacedBy(8.dp), + horizontalArrangement = Arrangement.spacedBy(8.dp) ) { items(themesForCurrentMode) { theme -> Column( modifier = Modifier .width(114.dp) - .padding(top = 8.dp), + .padding(top = 8.dp) ) { val isSelected = (isLight && currentLightTheme == theme.id) || - (!isLight && currentDarkTheme == theme.id) + (!isLight && currentDarkTheme == theme.id) MaterialTheme( - colors = if (isSelected) customColors else theme.colors, + colors = if (isSelected) customColors else theme.colors ) { ExtraColors.WithExtraColors( if (isSelected) customExtraColors else theme.extraColors @@ -210,7 +210,7 @@ fun SettingsAppearanceScreenContent( activeColors.primaryStateFlow.value = theme.colors.primary activeColors.secondaryStateFlow.value = theme.colors.secondary activeColors.tertiaryStateFlow.value = theme.extraColors.tertiary - }, + } ) } } @@ -224,7 +224,7 @@ fun SettingsAppearanceScreenContent( color = MaterialTheme.colors.onSurface, textAlign = TextAlign.Center, maxLines = 2, - style = MaterialTheme.typography.body2, + style = MaterialTheme.typography.body2 ) } } @@ -284,7 +284,7 @@ fun SettingsAppearanceScreenContent( @Composable fun AppThemePreviewItem( selected: Boolean, - onClick: () -> Unit, + onClick: () -> Unit ) { val dividerColor = MaterialTheme.colors.onSurface.copy(alpha = 0.2F) Column( @@ -298,12 +298,12 @@ fun AppThemePreviewItem( } else { dividerColor }, - shape = RoundedCornerShape(17.dp), + shape = RoundedCornerShape(17.dp) ) .padding(4.dp) .clip(RoundedCornerShape(13.dp)) .background(MaterialTheme.colors.background) - .clickable(onClick = onClick), + .clickable(onClick = onClick) ) { // App Bar Row( @@ -311,7 +311,7 @@ fun AppThemePreviewItem( .fillMaxWidth() .height(40.dp) .padding(8.dp), - verticalAlignment = Alignment.CenterVertically, + verticalAlignment = Alignment.CenterVertically ) { Box( modifier = Modifier @@ -320,19 +320,19 @@ fun AppThemePreviewItem( .padding(end = 4.dp) .background( color = MaterialTheme.colors.onSurface, - shape = MaterialTheme.shapes.small, - ), + shape = MaterialTheme.shapes.small + ) ) Box( modifier = Modifier.weight(0.3f), - contentAlignment = Alignment.CenterEnd, + contentAlignment = Alignment.CenterEnd ) { if (selected) { Icon( imageVector = Icons.Filled.CheckCircle, contentDescription = null, - tint = MaterialTheme.colors.primary, + tint = MaterialTheme.colors.primary ) } } @@ -344,28 +344,28 @@ fun AppThemePreviewItem( .padding(start = 8.dp, top = 2.dp) .background( color = dividerColor, - shape = MaterialTheme.shapes.small, + shape = MaterialTheme.shapes.small ) .fillMaxWidth(0.5f) - .aspectRatio(mangaAspectRatio), + .aspectRatio(mangaAspectRatio) ) { Row( modifier = Modifier .padding(4.dp) .size(width = 24.dp, height = 16.dp) - .clip(RoundedCornerShape(5.dp)), + .clip(RoundedCornerShape(5.dp)) ) { Box( modifier = Modifier .fillMaxHeight() .width(12.dp) - .background(MaterialTheme.extraColors.tertiary), + .background(MaterialTheme.extraColors.tertiary) ) Box( modifier = Modifier .fillMaxHeight() .width(12.dp) - .background(MaterialTheme.colors.secondary), + .background(MaterialTheme.colors.secondary) ) } } @@ -375,10 +375,10 @@ fun AppThemePreviewItem( modifier = Modifier .fillMaxWidth() .weight(1f), - contentAlignment = Alignment.BottomCenter, + contentAlignment = Alignment.BottomCenter ) { Surface( - elevation = 3.dp, + elevation = 3.dp ) { Row( modifier = Modifier @@ -386,15 +386,15 @@ fun AppThemePreviewItem( .fillMaxWidth() .background(MaterialTheme.colors.primarySurface) .padding(horizontal = 8.dp), - verticalAlignment = Alignment.CenterVertically, + verticalAlignment = Alignment.CenterVertically ) { Box( modifier = Modifier .size(17.dp) .background( color = MaterialTheme.colors.primary, - shape = CircleShape, - ), + shape = CircleShape + ) ) Box( modifier = Modifier @@ -404,11 +404,11 @@ fun AppThemePreviewItem( .weight(1f) .background( color = MaterialTheme.colors.onSurface, - shape = MaterialTheme.shapes.small, - ), + shape = MaterialTheme.shapes.small + ) ) } } } } -} \ No newline at end of file +} diff --git a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Constants.kt b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Constants.kt index 3efff90c..18f6872c 100644 --- a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Constants.kt +++ b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Constants.kt @@ -18,4 +18,4 @@ val verticalPadding = vertical val topPaddingValues = PaddingValues(top = vertical) const val ReadItemAlpha = .38f -const val SecondaryItemAlpha = .78f \ No newline at end of file +const val SecondaryItemAlpha = .78f diff --git a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Modifier.kt b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Modifier.kt index 7ff18ce0..27897401 100644 --- a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Modifier.kt +++ b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Modifier.kt @@ -22,4 +22,4 @@ fun Modifier.selectedBackground(isSelected: Boolean): Modifier = composed { } } -fun Modifier.secondaryItemAlpha(): Modifier = this.alpha(SecondaryItemAlpha) \ No newline at end of file +fun Modifier.secondaryItemAlpha(): Modifier = this.alpha(SecondaryItemAlpha) diff --git a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/theme/ExtraColors.kt b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/theme/ExtraColors.kt index 83f30331..6802c629 100644 --- a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/theme/ExtraColors.kt +++ b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/theme/ExtraColors.kt @@ -20,7 +20,7 @@ import androidx.compose.ui.graphics.Color @Stable class ExtraColors( tertiary: Color, - onTertiary: Color, + onTertiary: Color ) { var tertiary by mutableStateOf(tertiary, structuralEqualityPolicy()) internal set @@ -29,17 +29,17 @@ class ExtraColors( fun copy( tertiary: Color = this.tertiary, - onTertiary: Color = this.onTertiary, + onTertiary: Color = this.onTertiary ): ExtraColors = ExtraColors( tertiary, - onTertiary, + onTertiary ) override fun toString(): String { return "ExtraColors(" + - "tertiary=$tertiary, " + - "onTertiary=$onTertiary, " + - ")" + "tertiary=$tertiary, " + + "onTertiary=$onTertiary, " + + ")" } companion object { @@ -59,4 +59,4 @@ val MaterialTheme.extraColors: ExtraColors private val LocalExtraColors = staticCompositionLocalOf { error("The AppColors composable must be called before usage") -} \ No newline at end of file +} diff --git a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/theme/Themes.kt b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/theme/Themes.kt index 3801860f..4940da26 100644 --- a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/theme/Themes.kt +++ b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/theme/Themes.kt @@ -78,7 +78,7 @@ fun tachiyomiDarkColors( fun extraColors( tertiary: Color = Color(0xFF006E17), - onTertiary: Color = Color.White, + onTertiary: Color = Color.White ) = ExtraColors( tertiary = tertiary, onTertiary = onTertiary