mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-05 23:07:42 -05:00
Merge pull request #90922 from YeldhamDev/so_many_popupmenu_bugs
Fix wrong tooltip behavior in `PopupMenu`s that have styles with top borders
This commit is contained in:
@@ -1539,6 +1539,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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user