mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Merge pull request #81477 from timothyqiu/aligned
Fix submenu alignment with parent menu item
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user