Merge pull request #44276 from YeldhamDev/tooltip_position_embedded_fix

Fix tooltip position in main embedded window
This commit is contained in:
Rémi Verschelde 2021-01-01 16:28:59 +01:00 committed by GitHub
commit a6b869988f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1580,7 +1580,7 @@ void Viewport::_gui_show_tooltip() {
Point2 tooltip_offset = ProjectSettings::get_singleton()->get("display/mouse_cursor/tooltip_position_offset");
Rect2 r(gui.tooltip_pos + tooltip_offset, gui.tooltip_popup->get_contents_minimum_size());
Rect2i vr = gui.tooltip_popup->get_parent_visible_window()->get_usable_parent_rect();
Rect2i vr = gui.tooltip_popup->get_usable_parent_rect();
if (r.size.x + r.position.x > vr.size.x + vr.position.x) {
r.position.x = vr.position.x + vr.size.x - r.size.x;