mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
macOS themes: use rounded selection for menus and combo boxes; fixed menus and combo box selection colors (issue #497)
This commit is contained in:
@@ -50,8 +50,9 @@
|
||||
@selectionInactiveForeground = @foreground
|
||||
|
||||
# menu
|
||||
@menuSelectionBackground = @selectionBackground
|
||||
@menuHoverBackground = lighten(@menuBackground,10%,derived)
|
||||
@menuCheckBackground = darken(@selectionBackground,10%,derived noAutoInverse)
|
||||
@menuCheckBackground = darken(@menuSelectionBackground,10%,derived noAutoInverse)
|
||||
@menuAcceleratorForeground = darken(@foreground,15%)
|
||||
@menuAcceleratorSelectionForeground = @selectionForeground
|
||||
|
||||
|
||||
@@ -50,8 +50,9 @@
|
||||
@selectionInactiveForeground = @foreground
|
||||
|
||||
# menu
|
||||
@menuSelectionBackground = @selectionBackground
|
||||
@menuHoverBackground = darken(@menuBackground,10%,derived)
|
||||
@menuCheckBackground = lighten(@selectionBackground,40%,derived noAutoInverse)
|
||||
@menuCheckBackground = lighten(@menuSelectionBackground,40%,derived noAutoInverse)
|
||||
@menuAcceleratorForeground = lighten(@foreground,30%)
|
||||
@menuAcceleratorSelectionForeground = @selectionForeground
|
||||
|
||||
|
||||
@@ -96,6 +96,10 @@
|
||||
@textSelectionBackground = @nsSelectedTextBackgroundColor
|
||||
@textSelectionForeground = @nsSelectedTextColor
|
||||
|
||||
# menu
|
||||
@menuSelectionBackground = desaturate(@selectionBackground,20%)
|
||||
@menuItemMargin = 3,11,3,11
|
||||
|
||||
# accent colors (blueish)
|
||||
@accentColor = @nsControlAccentColor
|
||||
@accentFocusColor = @nsKeyboardFocusIndicatorColor
|
||||
@@ -141,6 +145,10 @@ ComboBox.buttonArrowColor = @nsSelectedMenuItemTextColor
|
||||
ComboBox.buttonHoverArrowColor = darken($ComboBox.buttonArrowColor,15%,derived noAutoInverse)
|
||||
ComboBox.buttonPressedArrowColor = darken($ComboBox.buttonArrowColor,25%,derived noAutoInverse)
|
||||
ComboBox.popupBackground = @menuBackground
|
||||
ComboBox.selectionBackground = @menuSelectionBackground
|
||||
ComboBox.popupInsets = 5,0,5,0
|
||||
ComboBox.selectionInsets = 0,5,0,5
|
||||
ComboBox.selectionArc = 8
|
||||
|
||||
|
||||
#---- Component ----
|
||||
@@ -167,6 +175,26 @@ FormattedTextField.selectionBackground = @textSelectionBackground
|
||||
FormattedTextField.selectionForeground = @textSelectionForeground
|
||||
|
||||
|
||||
#---- MenuBar ----
|
||||
|
||||
MenuBar.selectionInsets = 0,0,0,0
|
||||
MenuBar.selectionEmbeddedInsets = 3,0,3,0
|
||||
MenuBar.selectionArc = 8
|
||||
MenuBar.selectionBackground = lighten(@menuBackground,15%,derived)
|
||||
MenuBar.selectionForeground = @foreground
|
||||
|
||||
|
||||
#---- MenuItem ----
|
||||
|
||||
MenuItem.selectionInsets = 0,5,0,5
|
||||
MenuItem.selectionArc = 8
|
||||
|
||||
Menu.selectionBackground = @menuSelectionBackground
|
||||
MenuItem.selectionBackground = @menuSelectionBackground
|
||||
CheckBoxMenuItem.selectionBackground = @menuSelectionBackground
|
||||
RadioButtonMenuItem.selectionBackground = @menuSelectionBackground
|
||||
|
||||
|
||||
#---- PasswordField ---
|
||||
|
||||
PasswordField.disabledBackground = @disabledComponentBackground
|
||||
@@ -174,6 +202,11 @@ PasswordField.selectionBackground = @textSelectionBackground
|
||||
PasswordField.selectionForeground = @textSelectionForeground
|
||||
|
||||
|
||||
#---- PopupMenu ----
|
||||
|
||||
PopupMenu.borderInsets = 6,1,6,1
|
||||
|
||||
|
||||
#---- ProgressBar ----
|
||||
|
||||
ProgressBar.background = lighten(@background,8%)
|
||||
|
||||
@@ -96,6 +96,11 @@
|
||||
@textSelectionBackground = @nsSelectedTextBackgroundColor
|
||||
@textSelectionForeground = @foreground
|
||||
|
||||
# menu
|
||||
@menuSelectionBackground = lighten(@accentColor,12%)
|
||||
@menuCheckBackground = lighten(@menuSelectionBackground,25%,derived noAutoInverse)
|
||||
@menuItemMargin = 3,11,3,11
|
||||
|
||||
# accent colors (blueish)
|
||||
@accentColor = @nsControlAccentColor
|
||||
@accentFocusColor = @nsKeyboardFocusIndicatorColor
|
||||
@@ -141,6 +146,10 @@ ComboBox.buttonArrowColor = @nsSelectedMenuItemTextColor
|
||||
ComboBox.buttonHoverArrowColor = darken($ComboBox.buttonArrowColor,15%,derived noAutoInverse)
|
||||
ComboBox.buttonPressedArrowColor = darken($ComboBox.buttonArrowColor,25%,derived noAutoInverse)
|
||||
ComboBox.popupBackground = @menuBackground
|
||||
ComboBox.selectionBackground = @menuSelectionBackground
|
||||
ComboBox.popupInsets = 5,0,5,0
|
||||
ComboBox.selectionInsets = 0,5,0,5
|
||||
ComboBox.selectionArc = 8
|
||||
|
||||
|
||||
#---- Component ----
|
||||
@@ -167,6 +176,26 @@ FormattedTextField.selectionBackground = @textSelectionBackground
|
||||
FormattedTextField.selectionForeground = @textSelectionForeground
|
||||
|
||||
|
||||
#---- MenuBar ----
|
||||
|
||||
MenuBar.selectionInsets = 0,0,0,0
|
||||
MenuBar.selectionEmbeddedInsets = 3,0,3,0
|
||||
MenuBar.selectionArc = 8
|
||||
MenuBar.selectionBackground = darken(@menuBackground,15%,derived)
|
||||
MenuBar.selectionForeground = @foreground
|
||||
|
||||
|
||||
#---- MenuItem ----
|
||||
|
||||
MenuItem.selectionInsets = 0,5,0,5
|
||||
MenuItem.selectionArc = 8
|
||||
|
||||
Menu.selectionBackground = @menuSelectionBackground
|
||||
MenuItem.selectionBackground = @menuSelectionBackground
|
||||
CheckBoxMenuItem.selectionBackground = @menuSelectionBackground
|
||||
RadioButtonMenuItem.selectionBackground = @menuSelectionBackground
|
||||
|
||||
|
||||
#---- PasswordField ---
|
||||
|
||||
PasswordField.disabledBackground = @disabledComponentBackground
|
||||
@@ -174,6 +203,11 @@ PasswordField.selectionBackground = @textSelectionBackground
|
||||
PasswordField.selectionForeground = @textSelectionForeground
|
||||
|
||||
|
||||
#---- PopupMenu ----
|
||||
|
||||
PopupMenu.borderInsets = 6,1,6,1
|
||||
|
||||
|
||||
#---- ProgressBar ----
|
||||
|
||||
ProgressBar.background = darken(@background,5%)
|
||||
|
||||
Reference in New Issue
Block a user