|
@@ -1181,7 +1181,8 @@ void EditorNode::_vp_resized() {
|
|
}
|
|
}
|
|
|
|
|
|
void EditorNode::_titlebar_resized() {
|
|
void EditorNode::_titlebar_resized() {
|
|
- const Size2 &margin = DisplayServer::get_singleton()->window_get_safe_title_margins(DisplayServer::MAIN_WINDOW_ID);
|
|
|
|
|
|
+ DisplayServer::get_singleton()->window_set_window_buttons_offset(Vector2i(menu_hb->get_global_position().y + menu_hb->get_size().y / 2, menu_hb->get_global_position().y + menu_hb->get_size().y / 2), DisplayServer::MAIN_WINDOW_ID);
|
|
|
|
+ const Vector3i &margin = DisplayServer::get_singleton()->window_get_safe_title_margins(DisplayServer::MAIN_WINDOW_ID);
|
|
if (left_menu_spacer) {
|
|
if (left_menu_spacer) {
|
|
int w = (gui_base->is_layout_rtl()) ? margin.y : margin.x;
|
|
int w = (gui_base->is_layout_rtl()) ? margin.y : margin.x;
|
|
left_menu_spacer->set_custom_minimum_size(Size2(w, 0));
|
|
left_menu_spacer->set_custom_minimum_size(Size2(w, 0));
|
|
@@ -1190,6 +1191,9 @@ void EditorNode::_titlebar_resized() {
|
|
int w = (gui_base->is_layout_rtl()) ? margin.x : margin.y;
|
|
int w = (gui_base->is_layout_rtl()) ? margin.x : margin.y;
|
|
right_menu_spacer->set_custom_minimum_size(Size2(w, 0));
|
|
right_menu_spacer->set_custom_minimum_size(Size2(w, 0));
|
|
}
|
|
}
|
|
|
|
+ if (menu_hb) {
|
|
|
|
+ menu_hb->set_custom_minimum_size(Size2(0, margin.z - menu_hb->get_global_position().y));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
void EditorNode::_version_button_pressed() {
|
|
void EditorNode::_version_button_pressed() {
|
|
@@ -7560,7 +7564,6 @@ EditorNode::EditorNode() {
|
|
|
|
|
|
// Extend menu bar to window title.
|
|
// Extend menu bar to window title.
|
|
if (can_expand) {
|
|
if (can_expand) {
|
|
- DisplayServer::get_singleton()->window_set_window_buttons_offset(Vector2i(menu_hb->get_minimum_size().y / 2, menu_hb->get_minimum_size().y / 2), DisplayServer::MAIN_WINDOW_ID);
|
|
|
|
DisplayServer::get_singleton()->window_set_flag(DisplayServer::WINDOW_FLAG_EXTEND_TO_TITLE, true, DisplayServer::MAIN_WINDOW_ID);
|
|
DisplayServer::get_singleton()->window_set_flag(DisplayServer::WINDOW_FLAG_EXTEND_TO_TITLE, true, DisplayServer::MAIN_WINDOW_ID);
|
|
menu_hb->set_can_move_window(true);
|
|
menu_hb->set_can_move_window(true);
|
|
}
|
|
}
|