macOS themes: changing @accentColor variable in FlatLaf properties files did not change all accent related colors for all components

This commit is contained in:
Karl Tauber
2023-06-21 12:15:12 +02:00
parent 267defb321
commit f003e835bd
5 changed files with 101 additions and 99 deletions

View File

@@ -67,11 +67,11 @@
@nsControlAccentColor = #007aff
# accent colors are:
# @nsSelectedTextBackgroundColor
# @nsSelectedContentBackgroundColor
# @nsSelectedControlColor
# @nsKeyboardFocusIndicatorColor
# @nsControlAccentColor
# @nsSelectedTextBackgroundColor for @textSelectionBackground
# @nsSelectedContentBackgroundColor for @selectionBackground
# @nsSelectedControlColor unused
# @nsKeyboardFocusIndicatorColor for @accentFocusColor
# @nsControlAccentColor for @accentColor
#---- variables ----
@@ -88,12 +88,12 @@
@menuBackground = lighten(@background,8%)
# selection
@selectionBackground = if(systemColor(accent), shade(spin(systemColor(accent),4),20%), @nsSelectedContentBackgroundColor)
@selectionBackground = shade(spin(if(systemColor(accent), systemColor(accent), @accentColor),4),20%)
@selectionForeground = @nsSelectedMenuItemTextColor
@selectionInactiveBackground = @nsUnemphasizedSelectedContentBackgroundColor
# text selection
@textSelectionBackground = systemColor(highlight,if(systemColor(accent), darken(desaturate(systemColor(accent),60%),10%), @nsSelectedTextBackgroundColor))
@textSelectionBackground = systemColor(highlight,darken(desaturate(if(systemColor(accent), systemColor(accent), @accentColor),60%),10%))
@textSelectionForeground = @nsSelectedTextColor
# menu
@@ -102,7 +102,7 @@
# accent colors (blueish)
@accentColor = systemColor(accent,@nsControlAccentColor)
@accentFocusColor = if(systemColor(accent), fade(spin(systemColor(accent),-10),50%), @nsKeyboardFocusIndicatorColor)
@accentFocusColor = fade(lighten(spin(if(systemColor(accent), systemColor(accent), @accentColor),-8),5%),50%)
#---- Button ----

View File

@@ -67,11 +67,11 @@
@nsControlAccentColor = #007aff
# accent colors are:
# @nsSelectedTextBackgroundColor
# @nsSelectedContentBackgroundColor
# @nsSelectedControlColor
# @nsKeyboardFocusIndicatorColor
# @nsControlAccentColor
# @nsSelectedTextBackgroundColor for @textSelectionBackground
# @nsSelectedContentBackgroundColor for @selectionBackground
# @nsSelectedControlColor unused
# @nsKeyboardFocusIndicatorColor for @accentFocusColor
# @nsControlAccentColor for @accentColor
#---- variables ----
@@ -88,12 +88,12 @@
@menuBackground = darken(@background,4%)
# selection
@selectionBackground = if(systemColor(accent), shade(spin(systemColor(accent),4),10%), @nsSelectedContentBackgroundColor)
@selectionBackground = shade(spin(if(systemColor(accent), systemColor(accent), @accentColor),4),10%)
@selectionForeground = @nsSelectedMenuItemTextColor
@selectionInactiveBackground = @nsUnemphasizedSelectedContentBackgroundColor
# text selection
@textSelectionBackground = systemColor(highlight,if(systemColor(accent), tint(systemColor(accent),70%), @nsSelectedTextBackgroundColor))
@textSelectionBackground = systemColor(highlight,tint(if(systemColor(accent), systemColor(accent), @accentColor),70%))
@textSelectionForeground = @foreground
# menu
@@ -103,7 +103,7 @@
# accent colors (blueish)
@accentColor = systemColor(accent,@nsControlAccentColor)
@accentFocusColor = if(systemColor(accent), fade(spin(systemColor(accent),4),50%), @nsKeyboardFocusIndicatorColor)
@accentFocusColor = fade(spin(if(systemColor(accent), systemColor(accent), @accentColor),4),50%)
#---- Button ----