mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
Slider: improved thumb hover and pressed colors
Also changed auto-inverse threshold from 50% to 65% for increase and 35% for decrease, because this gives much better results for slider hover and pressed colors. This does not change other colors in core themes, but few colors in some IntelliJ themes (usually checkbox hover/pressed).
This commit is contained in:
@@ -13,6 +13,7 @@ FlatLaf Change Log
|
||||
buttons.
|
||||
- Slider: Support per component custom thumb and track colors via
|
||||
`JSlider.setForeground(Color)` and `JSlider.setBackground(Color)`.
|
||||
- Slider: Improved thumb hover and pressed colors.
|
||||
- TextComponent: Clip placeholder text if it does not fit into visible area. (PR
|
||||
#229)
|
||||
- macOS: Improved font rendering on macOS when using JetBrains Runtime. (PRs
|
||||
|
||||
@@ -125,8 +125,8 @@ public class ColorFunctions
|
||||
|
||||
protected boolean shouldInverse( float[] hsla ) {
|
||||
return increase
|
||||
? hsla[hslIndex] >= 50
|
||||
: hsla[hslIndex] < 50;
|
||||
? hsla[hslIndex] > 65
|
||||
: hsla[hslIndex] < 35;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -245,8 +245,8 @@ Slider.trackColor = #646464
|
||||
Slider.thumbColor = $Slider.trackValueColor
|
||||
Slider.tickColor = #888
|
||||
Slider.focusedColor = fade($Component.focusColor,70%,derived)
|
||||
Slider.hoverThumbColor = darken($Slider.thumbColor,10%,derived)
|
||||
Slider.pressedThumbColor = darken($Slider.thumbColor,15%,derived)
|
||||
Slider.hoverThumbColor = lighten($Slider.thumbColor,5%,derived)
|
||||
Slider.pressedThumbColor = lighten($Slider.thumbColor,8%,derived)
|
||||
Slider.disabledTrackColor = #4c5052
|
||||
Slider.disabledThumbColor = $Slider.disabledTrackColor
|
||||
|
||||
|
||||
@@ -257,8 +257,8 @@ Slider.trackColor = #c4c4c4
|
||||
Slider.thumbColor = $Slider.trackValueColor
|
||||
Slider.tickColor = #888
|
||||
Slider.focusedColor = fade($Component.focusColor,50%,derived)
|
||||
Slider.hoverThumbColor = lighten($Slider.thumbColor,10%,derived)
|
||||
Slider.pressedThumbColor = lighten($Slider.thumbColor,15%,derived)
|
||||
Slider.hoverThumbColor = darken($Slider.thumbColor,5%,derived)
|
||||
Slider.pressedThumbColor = darken($Slider.thumbColor,8%,derived)
|
||||
Slider.disabledTrackColor = #c0c0c0
|
||||
Slider.disabledThumbColor = $Slider.disabledTrackColor
|
||||
|
||||
|
||||
@@ -851,11 +851,11 @@ Slider.font [active] $defaultFont [UI]
|
||||
Slider.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.horizontalSize 200,21 java.awt.Dimension
|
||||
Slider.hoverThumbColor #346faa com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse)
|
||||
Slider.hoverThumbColor #5d95cd com.formdev.flatlaf.util.DerivedColor [UI] lighten(5% autoInverse)
|
||||
Slider.minimumHorizontalSize 36,21 java.awt.Dimension
|
||||
Slider.minimumVerticalSize 21,36 java.awt.Dimension
|
||||
Slider.onlyLeftMouseButtonDrag true
|
||||
Slider.pressedThumbColor #2e6296 com.formdev.flatlaf.util.DerivedColor [UI] darken(15% autoInverse)
|
||||
Slider.pressedThumbColor #699cd1 com.formdev.flatlaf.util.DerivedColor [UI] lighten(8% autoInverse)
|
||||
Slider.shadow #646464 javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.thumbColor #4a88c7 javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.thumbSize 12,12 javax.swing.plaf.DimensionUIResource [UI]
|
||||
|
||||
@@ -857,11 +857,11 @@ Slider.font [active] $defaultFont [UI]
|
||||
Slider.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.horizontalSize 200,21 java.awt.Dimension
|
||||
Slider.hoverThumbColor #1569bc com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse)
|
||||
Slider.hoverThumbColor #1775d3 com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse)
|
||||
Slider.minimumHorizontalSize 36,21 java.awt.Dimension
|
||||
Slider.minimumVerticalSize 21,36 java.awt.Dimension
|
||||
Slider.onlyLeftMouseButtonDrag true
|
||||
Slider.pressedThumbColor #125ca5 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse)
|
||||
Slider.pressedThumbColor #166ec5 com.formdev.flatlaf.util.DerivedColor [UI] darken(8% autoInverse)
|
||||
Slider.shadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.thumbColor #1e82e6 javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.thumbSize 12,12 javax.swing.plaf.DimensionUIResource [UI]
|
||||
|
||||
Reference in New Issue
Block a user