mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 07:17:13 -06:00
macOS themes: support changing accent and highlight colors (issue #497)
This commit is contained in:
@@ -88,12 +88,12 @@
|
||||
@menuBackground = lighten(@background,8%)
|
||||
|
||||
# selection
|
||||
@selectionBackground = @nsSelectedContentBackgroundColor
|
||||
@selectionBackground = if(systemColor(accent), shade(spin(systemColor(accent),4),20%), @nsSelectedContentBackgroundColor)
|
||||
@selectionForeground = @nsSelectedMenuItemTextColor
|
||||
@selectionInactiveBackground = @nsUnemphasizedSelectedContentBackgroundColor
|
||||
|
||||
# text selection
|
||||
@textSelectionBackground = @nsSelectedTextBackgroundColor
|
||||
@textSelectionBackground = systemColor(highlight,if(systemColor(accent), darken(desaturate(systemColor(accent),60%),10%), @nsSelectedTextBackgroundColor))
|
||||
@textSelectionForeground = @nsSelectedTextColor
|
||||
|
||||
# menu
|
||||
@@ -101,8 +101,8 @@
|
||||
@menuItemMargin = 3,11,3,11
|
||||
|
||||
# accent colors (blueish)
|
||||
@accentColor = @nsControlAccentColor
|
||||
@accentFocusColor = @nsKeyboardFocusIndicatorColor
|
||||
@accentColor = systemColor(accent,@nsControlAccentColor)
|
||||
@accentFocusColor = if(systemColor(accent), fade(spin(systemColor(accent),-10),50%), @nsKeyboardFocusIndicatorColor)
|
||||
|
||||
|
||||
#---- Button ----
|
||||
|
||||
@@ -88,12 +88,12 @@
|
||||
@menuBackground = darken(@background,4%)
|
||||
|
||||
# selection
|
||||
@selectionBackground = @nsSelectedContentBackgroundColor
|
||||
@selectionBackground = if(systemColor(accent), shade(spin(systemColor(accent),4),10%), @nsSelectedContentBackgroundColor)
|
||||
@selectionForeground = @nsSelectedMenuItemTextColor
|
||||
@selectionInactiveBackground = @nsUnemphasizedSelectedContentBackgroundColor
|
||||
|
||||
# text selection
|
||||
@textSelectionBackground = @nsSelectedTextBackgroundColor
|
||||
@textSelectionBackground = systemColor(highlight,if(systemColor(accent), tint(systemColor(accent),70%), @nsSelectedTextBackgroundColor))
|
||||
@textSelectionForeground = @foreground
|
||||
|
||||
# menu
|
||||
@@ -102,8 +102,8 @@
|
||||
@menuItemMargin = 3,11,3,11
|
||||
|
||||
# accent colors (blueish)
|
||||
@accentColor = @nsControlAccentColor
|
||||
@accentFocusColor = @nsKeyboardFocusIndicatorColor
|
||||
@accentColor = systemColor(accent,@nsControlAccentColor)
|
||||
@accentFocusColor = if(systemColor(accent), fade(spin(systemColor(accent),4),50%), @nsKeyboardFocusIndicatorColor)
|
||||
|
||||
|
||||
#---- Button ----
|
||||
|
||||
Reference in New Issue
Block a user