Merge pull request #81477 from timothyqiu/aligned
Fix submenu alignment with parent menu item
This commit is contained in:
commit
013bbd1a1e
1 changed files with 2 additions and 2 deletions
|
|
@ -205,9 +205,9 @@ void PopupMenu::_activate_submenu(int p_over, bool p_by_keyboard) {
|
|||
|
||||
Point2 submenu_pos;
|
||||
if (control->is_layout_rtl()) {
|
||||
submenu_pos = this_pos + Point2(-submenu_size.width, items[p_over]._ofs_cache + scroll_offset);
|
||||
submenu_pos = this_pos + Point2(-submenu_size.width, items[p_over]._ofs_cache + scroll_offset - theme_cache.v_separation / 2);
|
||||
} else {
|
||||
submenu_pos = this_pos + Point2(this_rect.size.width, items[p_over]._ofs_cache + scroll_offset);
|
||||
submenu_pos = this_pos + Point2(this_rect.size.width, items[p_over]._ofs_cache + scroll_offset - theme_cache.v_separation / 2);
|
||||
}
|
||||
|
||||
// Fix pos if going outside parent rect.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue