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:
Karl Tauber
2021-01-18 23:20:25 +01:00
parent 0b880aa335
commit fdc43fc0d3
6 changed files with 11 additions and 10 deletions

View File

@@ -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;
}
}

View File

@@ -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

View File

@@ -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