Skip to content

Commit

Permalink
Set divider's color directly into material's colors
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Aug 19, 2024
1 parent fdf235a commit 7afcd7e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private fun MainScaffold(
Box(modifier = Modifier.weight(1f)) {
content()
}
HorizontalDivider(color = SwissTransferTheme.colors.divider)
HorizontalDivider()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ private fun UploadSourceChoiceBottomSheet(
content = {
Column {
BottomSheetItem(AppIcons.Camera, R.string.transferUploadSourceChoiceCamera) { /*TODO*/ }
HorizontalDivider(Modifier.padding(horizontal = Margin.Medium), color = SwissTransferTheme.colors.divider)
HorizontalDivider(Modifier.padding(horizontal = Margin.Medium))
BottomSheetItem(AppIcons.PolaroidLandscape, R.string.transferUploadSourceChoiceGallery) { /*TODO*/ }
HorizontalDivider(Modifier.padding(horizontal = Margin.Medium), color = SwissTransferTheme.colors.divider)
HorizontalDivider(Modifier.padding(horizontal = Margin.Medium))
BottomSheetItem(AppIcons.Folder, R.string.transferUploadSourceChoiceFiles) { /*TODO*/ }
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ val DarkColorScheme = darkColorScheme(
surfaceContainerLow = Color(dark2), // Used for bottom sheet backgrounds
surfaceContainerHighest = Color(dark2),

outlineVariant = Color(dark3), // Used for divider's color

error = Color(error),
// onError: uses default values
)
Expand All @@ -63,6 +65,5 @@ val CustomDarkColorScheme = CustomColorScheme(
primaryTextColor = Color(rabbit),
secondaryTextColor = Color(shark),
navigationItemBackground = Color(dark2),
divider = Color(dark3),
tertiaryButtonBackground = Color(dark2),
)
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ val LightColorScheme = lightColorScheme(
surfaceContainerLow = Color(white), // Same value as background. Used for bottom sheet backgrounds
surfaceContainerHighest = Color(polar_bear),

outlineVariant = Color(mouse), // Used for divider's color

error = Color(error),
// onError: uses default values
)
Expand All @@ -68,6 +70,5 @@ val CustomLightColorScheme = CustomColorScheme(
primaryTextColor = Color(orca),
secondaryTextColor = Color(elephant),
navigationItemBackground = LightColorScheme.background,
divider = Color(mouse),
tertiaryButtonBackground = Color(rabbit),
)
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,5 @@ data class CustomColorScheme(
val primaryTextColor: Color = Color.Unspecified,
val secondaryTextColor: Color = Color.Unspecified,
val navigationItemBackground: Color = Color.Unspecified,
val divider: Color = Color.Unspecified,
val tertiaryButtonBackground: Color = Color.Unspecified,
)

0 comments on commit 7afcd7e

Please sign in to comment.