Fix submenu alignment with parent menu item
This commit is contained in:
parent
fc99492d30
commit
e5ad35a95f
@ -204,9 +204,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…
Reference in New Issue
Block a user