summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-08-26 23:03:31 +0200
committerGitHub <noreply@github.com>2022-08-26 23:03:31 +0200
commit4f60fd04809490ef46e43936bfe7f28a5e97830b (patch)
tree8a009dd5d5d887079990cb615a37aed1948e9bc2 /scene/gui
parentee461b7295c2e6736994ef33c3ace67355a674f8 (diff)
parentbc4ba6cb78b3815dbc61f220c406974c1c518dc5 (diff)
Merge pull request #64777 from bruvzg/extend_to_title
[macOS] Extend editor contents to the window title bar for better space usage.
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/menu_bar.cpp7
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;
}