diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-08-23 13:40:48 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-08-26 15:12:43 +0300 |
commit | bc4ba6cb78b3815dbc61f220c406974c1c518dc5 (patch) | |
tree | f6e21aed16d5d1b6b0f51ac22f06617c1f426e78 /scene/gui | |
parent | 0c639428dd4e4d92a6211c3bb4d04c3af1a4d266 (diff) |
[macOS] Extend editor contents to the window titlebar for better space usage.
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/menu_bar.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/scene/gui/menu_bar.cpp b/scene/gui/menu_bar.cpp index f450222130..9eba2feaf7 100644 --- a/scene/gui/menu_bar.cpp +++ b/scene/gui/menu_bar.cpp @@ -276,10 +276,7 @@ void MenuBar::_update_submenu(const String &p_menu_name, PopupMenu *p_child) { } bool MenuBar::is_native_menu() const { - if (!is_visible_in_tree()) { - return false; - } - if (Engine::get_singleton()->is_editor_hint() && get_tree()->get_edited_scene_root() && (get_tree()->get_edited_scene_root()->is_ancestor_of(this) || get_tree()->get_edited_scene_root() == this)) { + if (Engine::get_singleton()->is_editor_hint() && is_inside_tree() && get_tree()->get_edited_scene_root() && (get_tree()->get_edited_scene_root()->is_ancestor_of(this) || get_tree()->get_edited_scene_root() == this)) { return false; } @@ -308,7 +305,7 @@ void MenuBar::_clear_menu() { void MenuBar::_update_menu() { _clear_menu(); - if (!is_inside_tree()) { + if (!is_visible_in_tree()) { return; } |