summaryrefslogtreecommitdiff
path: root/scene/gui/line_edit.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-12-06 16:05:10 +0100
committerGitHub <noreply@github.com>2021-12-06 16:05:10 +0100
commite8082003f19ad8d98b6b2f74f64f4eaa7fe86353 (patch)
tree59ac76c6766279ce53f7b274053db8ca5d0d4fd8 /scene/gui/line_edit.cpp
parent78fd56a5968e7618f2a39f2759ead4c41b36734a (diff)
parent81efebb3a170dd6194905599361c38ae4246c434 (diff)
Merge pull request #52280 from jmb462/fix-bad-popup-offset-with-single-window-off
Diffstat (limited to 'scene/gui/line_edit.cpp')
-rw-r--r--scene/gui/line_edit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 30a6f0fc9a..3b39eaea02 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -227,7 +227,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
}
if (b->is_pressed() && b->get_button_index() == MouseButton::RIGHT && context_menu_enabled) {
_ensure_menu();
- menu->set_position(get_screen_transform().xform(get_local_mouse_position()));
+ menu->set_position(get_screen_position() + get_local_mouse_position());
menu->reset_size();
menu->popup();
grab_focus();
@@ -392,7 +392,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
if (k->is_action("ui_menu", true)) {
_ensure_menu();
Point2 pos = Point2(get_caret_pixel_pos().x, (get_size().y + get_theme_font(SNAME("font"))->get_height(get_theme_font_size(SNAME("font_size")))) / 2);
- menu->set_position(get_global_transform().xform(pos));
+ menu->set_position(get_screen_position() + pos);
menu->reset_size();
menu->popup();
menu->grab_focus();