Skip to content

Commit 701188f

Browse files
committed
Fix VSlider grabber area.
1 parent 6681f25 commit 701188f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scene/gui/slider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ void Slider::_notification(int p_what) {
275275
double areasize = size.height - (theme_cache.center_grabber ? 0 : grabber->get_height());
276276
int grabber_shift = theme_cache.center_grabber ? grabber->get_height() / 2 : 0;
277277
style->draw(ci, Rect2i(Point2i(size.width / 2 - widget_width / 2, 0), Size2i(widget_width, size.height)));
278-
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)));
278+
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))));
279279

280280
if (ticks > 1) {
281281
int grabber_offset = (grabber->get_height() / 2 - tick->get_height() / 2);

0 commit comments

Comments
 (0)