diff options
author | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-04-22 22:28:38 -0300 |
---|---|---|
committer | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-04-29 13:07:47 -0300 |
commit | b8e09f98c421c68816be9d58d528746efce91cb6 (patch) | |
tree | 8d57f188853b21c649fdab4060daa41cd88f10f1 /scene/gui/tab_container.cpp | |
parent | f5cc29f9f3536d965917161103c0ae12f2e70358 (diff) | |
download | redot-engine-b8e09f98c421c68816be9d58d528746efce91cb6.tar.gz |
Make buttons that trigger popups have the same scale
Diffstat (limited to 'scene/gui/tab_container.cpp')
-rw-r--r-- | scene/gui/tab_container.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index ad41cc4167..6997c2809c 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -86,8 +86,8 @@ void TabContainer::_gui_input(const Ref<InputEvent> &p_event) { emit_signal("pre_popup_pressed"); Vector2 popup_pos = get_global_position(); - popup_pos.x += size.width - popup->get_size().width; - popup_pos.y += menu->get_height(); + popup_pos.x += size.width * get_global_transform().get_scale().x - popup->get_size().width * popup->get_global_transform().get_scale().x; + popup_pos.y += menu->get_height() * get_global_transform().get_scale().y; popup->set_global_position(popup_pos); popup->popup(); @@ -350,6 +350,7 @@ void TabContainer::_notification(int p_what) { } } break; case NOTIFICATION_THEME_CHANGED: { + minimum_size_changed(); call_deferred("_on_theme_changed"); //wait until all changed theme } break; |