From 3642230cc2fa592d6ca6800a1092a53f979c1d95 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Fri, 8 May 2020 21:52:22 +0300 Subject: Fix slider thumbs rendering 1 pixel to the right --- src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java index 5934997..f68c5bb 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java @@ -73,7 +73,7 @@ public class WSlider extends WAbstractSlider { } else { int trackY = y + height / 2 - TRACK_WIDTH / 2; thumbX = direction == Direction.LEFT - ? (width - THUMB_SIZE) + 1 - (int) (coordToValueRatio * (value - min)) + ? (width - THUMB_SIZE) - (int) (coordToValueRatio * (value - min)) : Math.round(coordToValueRatio * (value - min)); thumbY = height / 2 - THUMB_SIZE / 2; thumbXOffset = 8; -- cgit