UI defaults:

- moved some common properties from FlatLightLaf.properties and FlatDarkLaf.properties to FlatLaf.properties
- use color functions for more properties
This commit is contained in:
Karl Tauber
2021-01-08 18:03:09 +01:00
parent 64d850c583
commit e3cac95d37
5 changed files with 40 additions and 30 deletions

View File

@@ -36,6 +36,12 @@
@cellFocusColor = #000
@icon = #adadad
# for buttons within components (e.g. combobox or spinner)
@buttonArrowColor = #9A9DA1
@buttonDisabledArrowColor = darken(@buttonArrowColor,25%)
@buttonHoverArrowColor = lighten(@buttonArrowColor,10%,derived noAutoInverse)
@buttonPressedArrowColor = lighten(@buttonArrowColor,20%,derived noAutoInverse)
# Drop (use lazy colors for IntelliJ platform themes, which usually do not specify these colors)
@dropCellBackground = darken(List.selectionBackground,10%,lazy)
@dropCellForeground = lazy(List.selectionForeground)
@@ -62,8 +68,8 @@ Button.selectedForeground = @foreground
Button.disabledSelectedBackground = lighten($Button.background,3%,derived)
Button.borderColor = #5e6060
Button.disabledBorderColor = #5e6060
Button.focusedBorderColor = #466d94
Button.disabledBorderColor = $Button.borderColor
Button.focusedBorderColor = $Component.focusedBorderColor
Button.hoverBorderColor = $Button.focusedBorderColor
Button.default.background = #365880
@@ -119,11 +125,7 @@ CheckBox.icon[filled].selectedPressedBackground = darken($CheckBox.icon[filled].
#---- ComboBox ----
ComboBox.buttonEditableBackground = #404445
ComboBox.buttonArrowColor = #9A9DA1
ComboBox.buttonDisabledArrowColor = darken($ComboBox.buttonArrowColor,25%)
ComboBox.buttonHoverArrowColor = lighten($ComboBox.buttonArrowColor,10%,derived noAutoInverse)
ComboBox.buttonPressedArrowColor = lighten($ComboBox.buttonArrowColor,20%,derived noAutoInverse)
ComboBox.buttonEditableBackground = darken($ComboBox.background,2%)
#---- Component ----
@@ -307,4 +309,4 @@ ToolTip.background = #1e2123
#---- Tree ----
Tree.hash = #505355
Tree.hash = lighten($Tree.background,5%)

View File

@@ -203,6 +203,10 @@ ComboBox.maximumRowCount = 15
ComboBox.buttonStyle = auto
ComboBox.background = @textComponentBackground
ComboBox.buttonBackground = @textComponentBackground
ComboBox.buttonArrowColor = @buttonArrowColor
ComboBox.buttonDisabledArrowColor = @buttonDisabledArrowColor
ComboBox.buttonHoverArrowColor = @buttonHoverArrowColor
ComboBox.buttonPressedArrowColor = @buttonPressedArrowColor
#---- Component ----
@@ -474,8 +478,8 @@ ScrollBar.hoverThumbWithTrack = false
ScrollBar.pressedThumbWithTrack = false
ScrollBar.showButtons = false
ScrollBar.squareButtons = false
ScrollBar.buttonArrowColor = $ComboBox.buttonArrowColor
ScrollBar.buttonDisabledArrowColor = $ComboBox.buttonDisabledArrowColor
ScrollBar.buttonArrowColor = @buttonArrowColor
ScrollBar.buttonDisabledArrowColor = @buttonDisabledArrowColor
ScrollBar.allowsAbsolutePositioning = true
[mac]ScrollBar.minimumThumbSize = 18,18
@@ -516,10 +520,10 @@ Slider.focusWidth = 4
Spinner.border = com.formdev.flatlaf.ui.FlatRoundBorder
Spinner.background = @textComponentBackground
Spinner.buttonBackground = $ComboBox.buttonEditableBackground
Spinner.buttonArrowColor = $ComboBox.buttonArrowColor
Spinner.buttonDisabledArrowColor = $ComboBox.buttonDisabledArrowColor
Spinner.buttonHoverArrowColor = $ComboBox.buttonHoverArrowColor
Spinner.buttonPressedArrowColor = $ComboBox.buttonPressedArrowColor
Spinner.buttonArrowColor = @buttonArrowColor
Spinner.buttonDisabledArrowColor = @buttonDisabledArrowColor
Spinner.buttonHoverArrowColor = @buttonHoverArrowColor
Spinner.buttonPressedArrowColor = @buttonPressedArrowColor
Spinner.padding = @textComponentMargin
Spinner.editorBorderPainted = false
# allowed values: button or none
@@ -536,9 +540,9 @@ SplitPane.oneTouchButtonSize = {scaledInteger}6
SplitPane.oneTouchButtonOffset = {scaledInteger}2
SplitPaneDivider.border = null
SplitPaneDivider.oneTouchArrowColor = $ComboBox.buttonArrowColor
SplitPaneDivider.oneTouchHoverArrowColor = $ComboBox.buttonHoverArrowColor
SplitPaneDivider.oneTouchPressedArrowColor = $ComboBox.buttonPressedArrowColor
SplitPaneDivider.oneTouchArrowColor = @buttonArrowColor
SplitPaneDivider.oneTouchHoverArrowColor = @buttonHoverArrowColor
SplitPaneDivider.oneTouchPressedArrowColor = @buttonPressedArrowColor
# allowed values: grip or plain
SplitPaneDivider.style = grip
SplitPaneDivider.gripColor = @icon

View File

@@ -36,6 +36,12 @@
@cellFocusColor = #000
@icon = #afafaf
# for buttons within components (e.g. combobox or spinner)
@buttonArrowColor = #666
@buttonDisabledArrowColor = lighten(@buttonArrowColor,25%)
@buttonHoverArrowColor = lighten(@buttonArrowColor,20%,derived noAutoInverse)
@buttonPressedArrowColor = lighten(@buttonArrowColor,30%,derived noAutoInverse)
# Drop (use lazy colors for IntelliJ platform themes, which usually do not specify these colors)
@dropCellBackground = lighten(List.selectionBackground,10%,lazy)
@dropCellForeground = lazy(List.selectionForeground)
@@ -47,8 +53,8 @@
activeCaption = #99b4d1
inactiveCaption = #bfcddb
controlHighlight = #e3e3e3
controlLtHighlight = #fff
controlHighlight = lighten($controlShadow,12%)
controlLtHighlight = lighten($controlShadow,25%)
controlDkShadow = darken($controlShadow,15%)
@@ -126,11 +132,7 @@ CheckBox.icon[filled].selectedPressedBackground = darken($CheckBox.icon[filled].
#---- ComboBox ----
ComboBox.buttonEditableBackground = #fafafa
ComboBox.buttonArrowColor = #666
ComboBox.buttonDisabledArrowColor = lighten($ComboBox.buttonArrowColor,25%)
ComboBox.buttonHoverArrowColor = lighten($ComboBox.buttonArrowColor,20%,derived noAutoInverse)
ComboBox.buttonPressedArrowColor = lighten($ComboBox.buttonArrowColor,30%,derived noAutoInverse)
ComboBox.buttonEditableBackground = darken($ComboBox.background,2%)
#---- Component ----
@@ -319,4 +321,4 @@ ToolTip.background = #fafafa
#---- Tree ----
Tree.hash = #E6E6E6
Tree.hash = darken($Tree.background,10%)

View File

@@ -1246,7 +1246,7 @@ Tree.editorBorder [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F
Tree.expandedIcon [lazy] 11,11 com.formdev.flatlaf.icons.FlatTreeExpandedIcon [UI]
Tree.font [active] $defaultFont [UI]
Tree.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Tree.hash #505355 javax.swing.plaf.ColorUIResource [UI]
Tree.hash #515657 javax.swing.plaf.ColorUIResource [UI]
Tree.icon.closedColor #adadad javax.swing.plaf.ColorUIResource [UI]
Tree.icon.collapsedColor #adadad javax.swing.plaf.ColorUIResource [UI]
Tree.icon.expandedColor #adadad javax.swing.plaf.ColorUIResource [UI]

View File

@@ -32,6 +32,12 @@
@cellFocusColor = #f00
@icon = #afafaf
# for buttons within components (e.g. combobox or spinner)
@buttonArrowColor = #666
@buttonDisabledArrowColor = #ABABAB
@buttonHoverArrowColor = #f00
@buttonPressedArrowColor = #00f
@dropCellBackground = #f00
@dropCellForeground = #0f0
@dropLineColor = #00f
@@ -118,10 +124,6 @@ CheckBox.icon.pressedBackground = #FFC800
ComboBox.background = #fff
ComboBox.buttonBackground = #f0f0f0
ComboBox.buttonEditableBackground = #ccc
ComboBox.buttonArrowColor = #666
ComboBox.buttonDisabledArrowColor = #ABABAB
ComboBox.buttonHoverArrowColor = #f00
ComboBox.buttonPressedArrowColor = #00f
#---- Component ----