summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-08-07 13:34:48 +0200
committerGitHub <noreply@github.com>2019-08-07 13:34:48 +0200
commit904e3100aceee7560e24ae1293c5b8a1e6201d55 (patch)
tree3545a249f9b8a743ed8cf721592764bec2889ac5 /scene
parentaf935af38dc0dfc01b010920c8624ac09491ea55 (diff)
parentdeec700497f860602a26cf16904e44a23cc722ce (diff)
Merge pull request #31127 from MuffinManKen/checkbox_implement_check_vadjust
Implemented check_vadjust in CheckBox & CheckButton. It was exposed to the editor, but not used.
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/check_box.cpp2
-rw-r--r--scene/gui/check_button.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/check_box.cpp b/scene/gui/check_box.cpp
index 1d8b74d9db..8744407763 100644
--- a/scene/gui/check_box.cpp
+++ b/scene/gui/check_box.cpp
@@ -79,7 +79,7 @@ void CheckBox::_notification(int p_what) {
Vector2 ofs;
ofs.x = sb->get_margin(MARGIN_LEFT);
- ofs.y = int((get_size().height - get_icon_size().height) / 2);
+ ofs.y = int((get_size().height - get_icon_size().height) / 2) + get_constant("check_vadjust");
if (is_pressed())
on->draw(ci, ofs);
diff --git a/scene/gui/check_button.cpp b/scene/gui/check_button.cpp
index a2d0f388c4..f47547f2cc 100644
--- a/scene/gui/check_button.cpp
+++ b/scene/gui/check_button.cpp
@@ -76,7 +76,7 @@ void CheckButton::_notification(int p_what) {
Size2 tex_size = get_icon_size();
ofs.x = get_size().width - (tex_size.width + sb->get_margin(MARGIN_RIGHT));
- ofs.y = (get_size().height - tex_size.height) / 2;
+ ofs.y = (get_size().height - tex_size.height) / 2 + get_constant("check_vadjust");
if (is_pressed())
on->draw(ci, ofs);