mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 05:50:53 +03:00
Slider: fixed slider colors in IntelliJ themes
This commit is contained in:
@@ -475,7 +475,9 @@ public class IntelliJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/** Rename UI default keys (key --> value). */
|
||||
private static Map<String, String> uiKeyMapping = new HashMap<>();
|
||||
/** Copy UI default keys (value --> key). */
|
||||
private static Map<String, String> uiKeyCopying = new HashMap<>();
|
||||
private static Map<String, String> uiKeyInverseMapping = new HashMap<>();
|
||||
private static Map<String, String> checkboxKeyMapping = new HashMap<>();
|
||||
@@ -529,6 +531,9 @@ public class IntelliJTheme
|
||||
|
||||
// Slider
|
||||
uiKeyMapping.put( "Slider.trackWidth", "" ); // ignore (used in Material Theme UI Lite)
|
||||
uiKeyCopying.put( "Slider.trackValueColor", "ProgressBar.foreground" );
|
||||
uiKeyCopying.put( "Slider.thumbColor", "ProgressBar.foreground" );
|
||||
uiKeyCopying.put( "Slider.trackColor", "ProgressBar.background" );
|
||||
|
||||
// TitlePane
|
||||
uiKeyCopying.put( "TitlePane.inactiveBackground", "TitlePane.background" );
|
||||
|
||||
@@ -82,6 +82,7 @@ public class FlatSliderUI
|
||||
protected Color trackColor;
|
||||
protected Color thumbColor;
|
||||
protected Color thumbBorderColor;
|
||||
protected Color focusBaseColor;
|
||||
protected Color focusedColor;
|
||||
protected Color focusedThumbBorderColor;
|
||||
protected Color hoverThumbColor;
|
||||
@@ -120,7 +121,8 @@ public class FlatSliderUI
|
||||
trackColor = UIManager.getColor( "Slider.trackColor" );
|
||||
thumbColor = UIManager.getColor( "Slider.thumbColor" );
|
||||
thumbBorderColor = UIManager.getColor( "Slider.thumbBorderColor" );
|
||||
focusedColor = FlatUIUtils.getUIColor( "Slider.focusedColor", "Component.focusColor" );
|
||||
focusBaseColor = UIManager.getColor( "Component.focusColor" );
|
||||
focusedColor = FlatUIUtils.getUIColor( "Slider.focusedColor", focusBaseColor );
|
||||
focusedThumbBorderColor = FlatUIUtils.getUIColor( "Slider.focusedThumbBorderColor", "Component.focusedBorderColor" );
|
||||
hoverThumbColor = UIManager.getColor( "Slider.hoverThumbColor" );
|
||||
pressedThumbColor = UIManager.getColor( "Slider.pressedThumbColor" );
|
||||
@@ -137,6 +139,7 @@ public class FlatSliderUI
|
||||
trackColor = null;
|
||||
thumbColor = null;
|
||||
thumbBorderColor = null;
|
||||
focusBaseColor = null;
|
||||
focusedColor = null;
|
||||
focusedThumbBorderColor = null;
|
||||
hoverThumbColor = null;
|
||||
@@ -282,6 +285,8 @@ debug*/
|
||||
? stateColor( slider, false, false, thumbBorderColor, disabledThumbBorderColor, focusedThumbBorderColor, null, null )
|
||||
: null;
|
||||
|
||||
Color focusedColor = FlatUIUtils.deriveColor( this.focusedColor, focusBaseColor );
|
||||
|
||||
paintThumb( g, slider, thumbRect, isRoundThumb(), color, borderColor, focusedColor, focusWidth );
|
||||
}
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ Slider.trackValueColor=#4A88C7
|
||||
Slider.trackColor=#646464
|
||||
Slider.thumbColor=$Slider.trackValueColor
|
||||
Slider.tickColor=#888
|
||||
Slider.focusedColor=fade($Component.focusColor,80%)
|
||||
Slider.focusedColor=fade($Component.focusColor,70%,derived)
|
||||
Slider.hoverThumbColor=darken($Slider.thumbColor,10%,derived)
|
||||
Slider.pressedThumbColor=darken($Slider.thumbColor,15%,derived)
|
||||
Slider.disabledTrackColor=#4c5052
|
||||
|
||||
@@ -253,7 +253,7 @@ Slider.trackValueColor=#1E82E6
|
||||
Slider.trackColor=#c4c4c4
|
||||
Slider.thumbColor=$Slider.trackValueColor
|
||||
Slider.tickColor=#888
|
||||
Slider.focusedColor=fade($Component.focusColor,50%)
|
||||
Slider.focusedColor=fade($Component.focusColor,50%,derived)
|
||||
Slider.hoverThumbColor=lighten($Slider.thumbColor,10%,derived)
|
||||
Slider.pressedThumbColor=lighten($Slider.thumbColor,15%,derived)
|
||||
Slider.disabledTrackColor=#c0c0c0
|
||||
|
||||
@@ -35,6 +35,11 @@ Button.default.hoverBorderColor=null
|
||||
HelpButton.hoverBorderColor=null
|
||||
|
||||
|
||||
#---- Slider ----
|
||||
|
||||
Slider.focusedColor=fade($Component.focusColor,40%,derived)
|
||||
|
||||
|
||||
#---- ToggleButton ----
|
||||
|
||||
ToggleButton.startBackground=$ToggleButton.background
|
||||
@@ -60,6 +65,8 @@ ToggleButton.endBackground=$ToggleButton.background
|
||||
[Cobalt_2]CheckBox.icon.background=#002946
|
||||
[Cobalt_2]CheckBox.icon.checkmarkColor=#002946
|
||||
|
||||
[Dark_purple]Slider.focusedColor=fade($Component.focusColor,70%,derived)
|
||||
|
||||
[Dracula]ProgressBar.selectionBackground=#fff
|
||||
[Dracula]ProgressBar.selectionForeground=#fff
|
||||
|
||||
@@ -81,6 +88,15 @@ ToggleButton.endBackground=$ToggleButton.background
|
||||
[High_contrast]ToggleButton.disabledSelectedBackground=#444
|
||||
[High_contrast]ToggleButton.toolbar.selectedBackground=#fff
|
||||
|
||||
[One_Dark]Slider.focusedColor=fade(#568af2,40%)
|
||||
|
||||
[Solarized_Dark]Slider.focusedColor=fade($Component.focusColor,80%,derived)
|
||||
|
||||
[vuesion-theme]Slider.trackValueColor=#ececee
|
||||
[vuesion-theme]Slider.trackColor=#303a45
|
||||
[vuesion-theme]Slider.thumbColor=#ececee
|
||||
[vuesion-theme]Slider.focusedColor=fade(#ececee,20%)
|
||||
|
||||
|
||||
# Material Theme UI Lite
|
||||
|
||||
|
||||
@@ -846,7 +846,7 @@ Slider.disabledTrackColor #4c5052 javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.focus #7e7e7e javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||
Slider.focusWidth 4
|
||||
Slider.focusedColor #cc3d6185 javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.focusedColor #b33d6185 com.formdev.flatlaf.util.DerivedColor [UI] fade(70%)
|
||||
Slider.font [active] $defaultFont [UI]
|
||||
Slider.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.highlight #242424 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
@@ -851,7 +851,7 @@ Slider.disabledTrackColor #c0c0c0 javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.focus #9e9e9e javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.focusInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||
Slider.focusWidth 4
|
||||
Slider.focusedColor #8097c3f3 javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.focusedColor #8097c3f3 com.formdev.flatlaf.util.DerivedColor [UI] fade(50%)
|
||||
Slider.font [active] $defaultFont [UI]
|
||||
Slider.foreground #000000 javax.swing.plaf.ColorUIResource [UI]
|
||||
Slider.highlight #ffffff javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
Reference in New Issue
Block a user