Browse Source

Fixed scaling issues.

Added volume slider gif.

Signed-off-by: weisj <weisj@arcor.de>
pull/27/head
weisj 5 years ago
parent
commit
0c94270b44
  1. BIN
      img/volumeSlider.gif
  2. 1
      src/main/java/com/github/weisj/darklaf/ui/slider/DarkSliderUI.java
  3. 4
      src/main/java/com/github/weisj/darklaf/util/DarkUIUtil.java

BIN
img/volumeSlider.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

1
src/main/java/com/github/weisj/darklaf/ui/slider/DarkSliderUI.java

@ -287,6 +287,7 @@ public class DarkSliderUI extends BasicSliderUI implements PropertyChangeListene
super.paintVerticalLabel(g, value, label); super.paintVerticalLabel(g, value, label);
} }
@Override @Override
public void paintThumb(final Graphics g2) { public void paintThumb(final Graphics g2) {
Graphics2D g = (Graphics2D) g2; Graphics2D g = (Graphics2D) g2;

4
src/main/java/com/github/weisj/darklaf/util/DarkUIUtil.java

@ -110,7 +110,7 @@ public final class DarkUIUtil {
g.setComposite(DarkUIUtil.GLOW_ALPHA); g.setComposite(DarkUIUtil.GLOW_ALPHA);
Outline.focus.setGraphicsColor(g, true); Outline.focus.setGraphicsColor(g, true);
float blw = (float) (6.0f / Scale.SCALE); float blw = 3.0f;
Path2D shape = new Path2D.Float(Path2D.WIND_EVEN_ODD); Path2D shape = new Path2D.Float(Path2D.WIND_EVEN_ODD);
shape.append(new Ellipse2D.Float(x - blw, y - blw, width + blw * 2, height + blw * 2), false); shape.append(new Ellipse2D.Float(x - blw, y - blw, width + blw * 2, height + blw * 2), false);
shape.append(new Ellipse2D.Float(x, y, width, height), false); shape.append(new Ellipse2D.Float(x, y, width, height), false);
@ -120,7 +120,7 @@ public final class DarkUIUtil {
public static void paintLineBorder(final Graphics2D g, final float x, final float y, public static void paintLineBorder(final Graphics2D g, final float x, final float y,
final float width, final float height, final int arc, final boolean growByLW) { final float width, final float height, final int arc, final boolean growByLW) {
float lw = (float) (1.0f / Scale.SCALE); float lw = 0.5f;
float adj = growByLW ? lw : 0; float adj = growByLW ? lw : 0;
GraphicsContext config = GraphicsUtil.setupStrokePainting(g); GraphicsContext config = GraphicsUtil.setupStrokePainting(g);
Path2D border = new Path2D.Float(Path2D.WIND_EVEN_ODD); Path2D border = new Path2D.Float(Path2D.WIND_EVEN_ODD);

Loading…
Cancel
Save