Skip to content

Commit

Permalink
Chore: Replace usages of Local*ColorScheme with *Theme.colorScheme
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamsinghshubham777 committed Apr 7, 2024
1 parent 961c469 commit f2ba43b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ object IOSButtonDefaults {
)

@Composable
fun textStyle(size: IOSButtonSize): TextStyle = with(LocalIOSTypography.current) {
fun textStyle(size: IOSButtonSize): TextStyle = with(IOSTheme.typography) {
when (size) {
IOSButtonSize.Small -> subheadlineRegular
IOSButtonSize.Medium -> subheadlineRegular
Expand Down
60 changes: 30 additions & 30 deletions adapt/src/commonMain/kotlin/design/adapt/windows/WindowsButton.kt
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,17 @@ object WindowsButtonDefaults {

@Composable
fun standardButtonColors(
containerColor: Color = LocalWindowsColorScheme.current.fillControlDefault,
hoveredContainerColor: Color = LocalWindowsColorScheme.current.fillControlSecondary,
pressedContainerColor: Color = LocalWindowsColorScheme.current.fillControlTertiary,
disabledContainerColor: Color = LocalWindowsColorScheme.current.fillControlDisabled,
contentColor: Color = LocalWindowsColorScheme.current.fillTextPrimary,
hoveredContentColor: Color = LocalWindowsColorScheme.current.fillTextPrimary,
pressedContentColor: Color = LocalWindowsColorScheme.current.fillTextSecondary,
disabledContentColor: Color = LocalWindowsColorScheme.current.fillTextDisabled,
borderColors: List<Color> = LocalWindowsColorScheme.current.elevationControlBorder,
pressedBorderColor: Color = LocalWindowsColorScheme.current.strokeControlDefault,
disabledBorderColor: Color = LocalWindowsColorScheme.current.strokeControlDefault,
containerColor: Color = WindowsTheme.colorScheme.fillControlDefault,
hoveredContainerColor: Color = WindowsTheme.colorScheme.fillControlSecondary,
pressedContainerColor: Color = WindowsTheme.colorScheme.fillControlTertiary,
disabledContainerColor: Color = WindowsTheme.colorScheme.fillControlDisabled,
contentColor: Color = WindowsTheme.colorScheme.fillTextPrimary,
hoveredContentColor: Color = WindowsTheme.colorScheme.fillTextPrimary,
pressedContentColor: Color = WindowsTheme.colorScheme.fillTextSecondary,
disabledContentColor: Color = WindowsTheme.colorScheme.fillTextDisabled,
borderColors: List<Color> = WindowsTheme.colorScheme.elevationControlBorder,
pressedBorderColor: Color = WindowsTheme.colorScheme.strokeControlDefault,
disabledBorderColor: Color = WindowsTheme.colorScheme.strokeControlDefault,
) = WindowsButtonColors(
containerColor = containerColor,
hoveredContainerColor = hoveredContainerColor,
Expand All @@ -220,17 +220,17 @@ object WindowsButtonDefaults {

@Composable
fun accentButtonColors(
containerColor: Color = LocalWindowsColorScheme.current.fillAccentDefault,
hoveredContainerColor: Color = LocalWindowsColorScheme.current.fillAccentSecondary,
pressedContainerColor: Color = LocalWindowsColorScheme.current.fillAccentTertiary,
disabledContainerColor: Color = LocalWindowsColorScheme.current.fillAccentDisabled,
contentColor: Color = LocalWindowsColorScheme.current.fillTextOnAccentPrimary,
hoveredContentColor: Color = LocalWindowsColorScheme.current.fillTextOnAccentPrimary,
pressedContentColor: Color = LocalWindowsColorScheme.current.fillTextOnAccentSecondary,
disabledContentColor: Color = LocalWindowsColorScheme.current.fillTextOnAccentDisabled,
borderColors: List<Color> = LocalWindowsColorScheme.current.elevationAccentControlBorder,
pressedBorderColor: Color = LocalWindowsColorScheme.current.strokeControlDefault,
disabledBorderColor: Color = LocalWindowsColorScheme.current.strokeControlDefault,
containerColor: Color = WindowsTheme.colorScheme.fillAccentDefault,
hoveredContainerColor: Color = WindowsTheme.colorScheme.fillAccentSecondary,
pressedContainerColor: Color = WindowsTheme.colorScheme.fillAccentTertiary,
disabledContainerColor: Color = WindowsTheme.colorScheme.fillAccentDisabled,
contentColor: Color = WindowsTheme.colorScheme.fillTextOnAccentPrimary,
hoveredContentColor: Color = WindowsTheme.colorScheme.fillTextOnAccentPrimary,
pressedContentColor: Color = WindowsTheme.colorScheme.fillTextOnAccentSecondary,
disabledContentColor: Color = WindowsTheme.colorScheme.fillTextOnAccentDisabled,
borderColors: List<Color> = WindowsTheme.colorScheme.elevationAccentControlBorder,
pressedBorderColor: Color = WindowsTheme.colorScheme.strokeControlDefault,
disabledBorderColor: Color = WindowsTheme.colorScheme.strokeControlDefault,
) = WindowsButtonColors(
containerColor = containerColor,
hoveredContainerColor = hoveredContainerColor,
Expand All @@ -247,14 +247,14 @@ object WindowsButtonDefaults {

@Composable
fun subtleButtonColors(
containerColor: Color = LocalWindowsColorScheme.current.fillSubtleTransparent,
hoveredContainerColor: Color = LocalWindowsColorScheme.current.fillSubtleSecondary,
pressedContainerColor: Color = LocalWindowsColorScheme.current.fillSubtleTertiary,
disabledContainerColor: Color = LocalWindowsColorScheme.current.fillSubtleDisabled,
contentColor: Color = LocalWindowsColorScheme.current.fillTextPrimary,
hoveredContentColor: Color = LocalWindowsColorScheme.current.fillTextPrimary,
pressedContentColor: Color = LocalWindowsColorScheme.current.fillTextSecondary,
disabledContentColor: Color = LocalWindowsColorScheme.current.fillTextDisabled,
containerColor: Color = WindowsTheme.colorScheme.fillSubtleTransparent,
hoveredContainerColor: Color = WindowsTheme.colorScheme.fillSubtleSecondary,
pressedContainerColor: Color = WindowsTheme.colorScheme.fillSubtleTertiary,
disabledContainerColor: Color = WindowsTheme.colorScheme.fillSubtleDisabled,
contentColor: Color = WindowsTheme.colorScheme.fillTextPrimary,
hoveredContentColor: Color = WindowsTheme.colorScheme.fillTextPrimary,
pressedContentColor: Color = WindowsTheme.colorScheme.fillTextSecondary,
disabledContentColor: Color = WindowsTheme.colorScheme.fillTextDisabled,
) = WindowsButtonColors(
containerColor = containerColor,
hoveredContainerColor = hoveredContainerColor,
Expand Down

0 comments on commit f2ba43b

Please sign in to comment.