mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 06:57:13 -06: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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user