diff options
Diffstat (limited to 'scene/gui/line_edit.cpp')
-rw-r--r-- | scene/gui/line_edit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 4a85cf2c45..69b08fda3c 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -228,7 +228,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_size(Vector2(1, 1)); + menu->reset_size(); menu->popup(); grab_focus(); accept_event(); @@ -393,7 +393,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) { _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_size(Vector2(1, 1)); + menu->reset_size(); menu->popup(); menu->grab_focus(); } |