[macOS] Extend editor contents to the window titlebar for better space usage.

This commit is contained in:
bruvzg 2022-08-23 13:40:48 +03:00
parent 0c639428dd
commit bc4ba6cb78
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38
15 changed files with 300 additions and 13 deletions

View file

@ -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;
}