summaryrefslogtreecommitdiff
path: root/scene/gui/slider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/slider.cpp')
-rw-r--r--scene/gui/slider.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp
index 8fda5df53c..116e0ac354 100644
--- a/scene/gui/slider.cpp
+++ b/scene/gui/slider.cpp
@@ -181,7 +181,7 @@ void Slider::_notification(int p_what) {
for (int i = 0; i < ticks; i++) {
if (!ticks_on_borders && (i == 0 || i + 1 == ticks)) continue;
int ofs = i * tickarea / (ticks - 1);
- tick->draw(ci, Point2(0, ofs));
+ tick->draw(ci, Point2i((size.width - widget_width) / 2, ofs));
}
}
grabber->draw(ci, Point2i(size.width / 2 - grabber->get_size().width / 2, size.height - get_as_ratio() * areasize - grabber->get_size().height));
@@ -202,7 +202,7 @@ void Slider::_notification(int p_what) {
for (int i = 0; i < ticks; i++) {
if ((!ticks_on_borders) && ((i == 0) || ((i + 1) == ticks))) continue;
int ofs = i * tickarea / (ticks - 1);
- tick->draw(ci, Point2(ofs, 0));
+ tick->draw(ci, Point2i(ofs, (size.height - widget_height) / 2));
}
}
grabber->draw(ci, Point2i(get_as_ratio() * areasize, size.height / 2 - grabber->get_size().height / 2));