diff options
author | Mounir Tohami <53877170+WhalesState@users.noreply.github.com> | 2024-09-14 12:40:41 +0000 |
---|---|---|
committer | Mounir Tohami <53877170+WhalesState@users.noreply.github.com> | 2024-09-14 12:40:41 +0000 |
commit | 701188fd1e343a1ea8b4243f79cd6e9b4a0773ab (patch) | |
tree | 74d4f0efdd7bb31458cfa47db1c30257c48f9171 | |
parent | 6681f2563b99e14929a8acb27f4908fece398ef1 (diff) | |
download | redot-engine-701188fd1e343a1ea8b4243f79cd6e9b4a0773ab.tar.gz |
Fix `VSlider` grabber area.
-rw-r--r-- | scene/gui/slider.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp index f984d781d3..6098548d32 100644 --- a/scene/gui/slider.cpp +++ b/scene/gui/slider.cpp @@ -275,7 +275,7 @@ void Slider::_notification(int p_what) { double areasize = size.height - (theme_cache.center_grabber ? 0 : grabber->get_height()); int grabber_shift = theme_cache.center_grabber ? grabber->get_height() / 2 : 0; style->draw(ci, Rect2i(Point2i(size.width / 2 - widget_width / 2, 0), Size2i(widget_width, size.height))); - grabber_area->draw(ci, Rect2i(Point2i((size.width - widget_width) / 2, size.height - areasize * ratio - grabber->get_height() / 2 + grabber_shift), Size2i(widget_width, areasize * ratio + grabber->get_height() / 2 - grabber_shift))); + grabber_area->draw(ci, Rect2i(Point2i((size.width - widget_width) / 2, Math::round(size.height - areasize * ratio - grabber->get_height() / 2 + grabber_shift)), Size2i(widget_width, Math::round(areasize * ratio + grabber->get_height() / 2 - grabber_shift)))); if (ticks > 1) { int grabber_offset = (grabber->get_height() / 2 - tick->get_height() / 2); |