Fix wrong tooltip behavior in PopupMenus that have styles with top borders
This commit is contained in:
parent
97b8ad1af0
commit
565b21b116
1 changed files with 5 additions and 0 deletions
|
|
@ -1400,6 +1400,11 @@ String Viewport::_gui_get_tooltip(Control *p_control, const Vector2 &p_pos, Cont
|
|||
// Temporary solution for PopupMenus.
|
||||
PopupMenu *menu = Object::cast_to<PopupMenu>(this);
|
||||
if (menu) {
|
||||
Ref<StyleBox> sb = menu->get_theme_stylebox(SceneStringName(panel));
|
||||
if (sb.is_valid()) {
|
||||
pos.y += sb->get_margin(SIDE_TOP);
|
||||
}
|
||||
|
||||
tooltip = menu->get_tooltip(pos);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue