diff --git a/arcade/gui/widgets/slider.py b/arcade/gui/widgets/slider.py index 22afa2cb7..acca61978 100644 --- a/arcade/gui/widgets/slider.py +++ b/arcade/gui/widgets/slider.py @@ -98,7 +98,7 @@ def _x_for_value(self, value: float): """Provides the x coordinate for the given value.""" x = self.content_rect.left - val = (value - self.min_value) / self.max_value + val = (value - self.min_value) / (self.max_value - self.min_value) return x + self._cursor_width + val * (self.content_width - 2 * self._cursor_width) @property