summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-06-14 19:22:25 +0200
committerGitHub <noreply@github.com>2021-06-14 19:22:25 +0200
commit16027e7cf412140c128e7c002ce0be533b94db00 (patch)
treec1da667147cd7434c28ceae371c309a2a888c78a
parentdedb314abbf15da30729cf3f2565eaa909daa296 (diff)
parentbe8667944d49bd111be40a4cea7cc64f75637fef (diff)
Merge pull request #49572 from azagaya/fix_grabber_area
Fix vertical slider grabber_area height calculation
-rw-r--r--scene/gui/slider.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp
index a407ef21cb..5947f3b99e 100644
--- a/scene/gui/slider.cpp
+++ b/scene/gui/slider.cpp
@@ -172,7 +172,7 @@ void Slider::_notification(int p_what) {
int widget_width = style->get_minimum_size().width + style->get_center_size().width;
float areasize = size.height - grabber->get_size().height;
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_size().height / 2), Size2i(widget_width, areasize * ratio + grabber->get_size().width / 2)));
+ grabber_area->draw(ci, Rect2i(Point2i((size.width - widget_width) / 2, size.height - areasize * ratio - grabber->get_size().height / 2), Size2i(widget_width, areasize * ratio + grabber->get_size().height / 2)));
if (ticks > 1) {
int grabber_offset = (grabber->get_size().height / 2 - tick->get_height() / 2);