Skip to content

Commit

Permalink
Merge pull request godotengine#44276 from YeldhamDev/tooltip_position…
Browse files Browse the repository at this point in the history
…_embedded_fix

Fix tooltip position in main embedded window
  • Loading branch information
akien-mga authored Jan 1, 2021
2 parents f8130ff + 4802744 commit a6b8699
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a6b8699

Please sign in to comment.