|
|
@ -16,7 +16,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
package com.bulenkov.darcula.ui; |
|
|
|
package com.bulenkov.darcula.ui; |
|
|
|
|
|
|
|
|
|
|
|
import com.bulenkov.iconloader.util.ColorUtil; |
|
|
|
|
|
|
|
import com.bulenkov.iconloader.util.GraphicsConfig; |
|
|
|
import com.bulenkov.iconloader.util.GraphicsConfig; |
|
|
|
import com.bulenkov.iconloader.util.GraphicsUtil; |
|
|
|
import com.bulenkov.iconloader.util.GraphicsUtil; |
|
|
|
import com.intellij.util.ui.JBDimension; |
|
|
|
import com.intellij.util.ui.JBDimension; |
|
|
@ -98,22 +97,17 @@ public class DarculaSliderUI extends BasicSliderUI { |
|
|
|
|
|
|
|
|
|
|
|
@NotNull |
|
|
|
@NotNull |
|
|
|
protected Color getTrackBackground() { |
|
|
|
protected Color getTrackBackground() { |
|
|
|
return ColorUtil.fromHex("2b2b2b"); |
|
|
|
return UIManager.getColor("Slider.trackBackground"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@NotNull |
|
|
|
@NotNull |
|
|
|
protected Color getSelectedTrackColor() { |
|
|
|
protected Color getSelectedTrackColor() { |
|
|
|
return ColorUtil.fromHex("888888"); |
|
|
|
return UIManager.getColor("Slider.selectedTrackColor"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@NotNull |
|
|
|
@NotNull |
|
|
|
protected Color getDisabledTickColor() { |
|
|
|
protected Color getDisabledTickColor() { |
|
|
|
return ColorUtil.fromHex("555555"); |
|
|
|
return UIManager.getColor("Slider.disabledTickColor"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void paintTicks(Graphics g) { |
|
|
|
|
|
|
|
super.paintTicks(g); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -179,7 +173,6 @@ public class DarculaSliderUI extends BasicSliderUI { |
|
|
|
g.setColor(slider.getBackground().darker()); |
|
|
|
g.setColor(slider.getBackground().darker()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isPlainThumb()) { |
|
|
|
if (isPlainThumb()) { |
|
|
|
double r = slider.getOrientation() == JSlider.HORIZONTAL ? h : w; |
|
|
|
double r = slider.getOrientation() == JSlider.HORIZONTAL ? h : w; |
|
|
|
final Ellipse2D.Double thumb = new Ellipse2D.Double(0, 0, r, r); |
|
|
|
final Ellipse2D.Double thumb = new Ellipse2D.Double(0, 0, r, r); |
|
|
@ -259,7 +252,7 @@ public class DarculaSliderUI extends BasicSliderUI { |
|
|
|
|
|
|
|
|
|
|
|
@NotNull |
|
|
|
@NotNull |
|
|
|
protected Color getThumbBorderColor() { |
|
|
|
protected Color getThumbBorderColor() { |
|
|
|
return slider.isEnabled() ? ColorUtil.fromHex("707070") : ColorUtil.fromHex("444444"); |
|
|
|
return slider.isEnabled() ? UIManager.getColor("Slider.thumbBorderColor") : UIManager.getColor("Slider.thumbBorderColorDisabled"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected boolean isPlainThumb() { |
|
|
|
protected boolean isPlainThumb() { |
|
|
|