Godot Engine – Multi-platform 2D and 3D game engine
Fix shortcuts and docks margins
Kapparoti75644fe157f1
diff --git a/editor/audio/editor_audio_buses.cpp b/editor/audio/editor_audio_buses.cppindex 99e7edfbd29..8b744bf9e63 100644--- a/editor/audio/editor_audio_buses.cpp+++ b/editor/audio/editor_audio_buses.cpp@@ -1530,10 +1530,10 @@ void EditorAudioBuses::_file_dialog_callback(const String &p_string) {void EditorAudioBuses::update_layout(EditorDock::DockLayout p_layout, EditorDock::DockSlot p_slot) {if (p_slot != EditorDock::DOCK_SLOT_BOTTOM) {- bus_mc->set_theme_type_variation("NoBorderHorizontalBottom");+ bus_mc->set_theme_type_variation("NoBorderBottomPanel");bus_scroll->set_scroll_hint_mode(ScrollContainer::SCROLL_HINT_MODE_TOP_AND_LEFT);} else {- bus_mc->set_theme_type_variation("NoBorderHorizontal");+ bus_mc->set_theme_type_variation("NoBorderPanel");bus_scroll->set_scroll_hint_mode(ScrollContainer::SCROLL_HINT_MODE_ALL);}}@@ -1578,7 +1578,7 @@ EditorAudioBuses::EditorAudioBuses() {menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorAudioBuses::_menu_option));bus_mc = memnew(MarginContainer);- bus_mc->set_theme_type_variation("NoBorderHorizontal");+ bus_mc->set_theme_type_variation("NoBorderPanel");bus_mc->set_v_size_flags(SIZE_EXPAND_FILL);main_vb->add_child(bus_mc);diff --git a/editor/docks/filesystem_dock.cpp b/editor/docks/filesystem_dock.cppindex b853d1fb55d..035d05d1661 100644--- a/editor/docks/filesystem_dock.cpp+++ b/editor/docks/filesystem_dock.cpp@@ -513,7 +513,7 @@ void FileSystemDock::_update_display_mode(bool p_force) {toolbar2_hbc->show();tree->set_scroll_hint_mode(Tree::SCROLL_HINT_MODE_TOP);- tree_mc->set_theme_type_variation("NoBorderHorizontalBottom");+ tree_mc->set_theme_type_variation("NoBorderBottomPanel");}button_file_list_display_mode->hide();diff --git a/editor/docks/groups_editor.cpp b/editor/docks/groups_editor.cppindex 3ed19ec1628..2eb8e2ce465 100644--- a/editor/docks/groups_editor.cpp+++ b/editor/docks/groups_editor.cpp@@ -918,7 +918,7 @@ GroupsEditor::GroupsEditor() {hbc->add_child(filter);MarginContainer *mc = memnew(MarginContainer);- mc->set_theme_type_variation("NoBorderHorizontalBottom");+ mc->set_theme_type_variation("NoBorderBottomPanel");mc->set_v_size_flags(SIZE_EXPAND_FILL);holder->add_child(mc);diff --git a/editor/docks/history_dock.cpp b/editor/docks/history_dock.cppindex ac81ee212b9..d51ae9d816b 100644--- a/editor/docks/history_dock.cpp+++ b/editor/docks/history_dock.cpp@@ -270,7 +270,7 @@ HistoryDock::HistoryDock() {global_history_checkbox->connect(SceneStringName(toggled), callable_mp(this, &HistoryDock::refresh_history).unbind(1));MarginContainer *mc = memnew(MarginContainer);- mc->set_theme_type_variation("NoBorderHorizontalBottom");+ mc->set_theme_type_variation("NoBorderBottomPanel");mc->set_v_size_flags(SIZE_EXPAND_FILL);main_vb->add_child(mc);diff --git a/editor/docks/import_dock.cpp b/editor/docks/import_dock.cppindex d641dfebe43..54be40470c4 100644--- a/editor/docks/import_dock.cpp+++ b/editor/docks/import_dock.cpp@@ -785,7 +785,7 @@ ImportDock::ImportDock() {hb->add_child(preset);MarginContainer *mc = memnew(MarginContainer);- mc->set_theme_type_variation("NoBorderHorizontal");+ mc->set_theme_type_variation("NoBorderPanel");mc->set_v_size_flags(SIZE_EXPAND_FILL);content->add_child(mc);diff --git a/editor/docks/inspector_dock.cpp b/editor/docks/inspector_dock.cppindex edbe49f9688..7b3cb22dd2b 100644--- a/editor/docks/inspector_dock.cpp+++ b/editor/docks/inspector_dock.cpp@@ -867,7 +867,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {MarginContainer *mc = memnew(MarginContainer);main_vb->add_child(mc);- mc->set_theme_type_variation("NoBorderHorizontalBottom");+ mc->set_theme_type_variation("NoBorderBottomPanel");mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);inspector = EditorInspector::create_default_inspector(search);diff --git a/editor/docks/scene_tree_dock.cpp b/editor/docks/scene_tree_dock.cppindex c9f712bfbf2..bf5bdf651e9 100644--- a/editor/docks/scene_tree_dock.cpp+++ b/editor/docks/scene_tree_dock.cpp@@ -4716,7 +4716,7 @@ void SceneTreeDock::_update_create_root_dialog_visibility() {create_root_dialog->show();scene_tree->hide();} else {- main_mc->set_theme_type_variation("NoBorderHorizontalBottom");+ main_mc->set_theme_type_variation("NoBorderBottomPanel");create_root_dialog->hide();scene_tree->show();}diff --git a/editor/import/import_defaults_editor.cpp b/editor/import/import_defaults_editor.cppindex 89abbe27fde..0f210ec961d 100644--- a/editor/import/import_defaults_editor.cpp+++ b/editor/import/import_defaults_editor.cpp@@ -216,7 +216,7 @@ ImportDefaultsEditor::ImportDefaultsEditor() {add_child(hb);MarginContainer *mc = memnew(MarginContainer);- mc->set_theme_type_variation("NoBorderHorizontal");+ mc->set_theme_type_variation("NoBorderPanel");mc->set_v_size_flags(SIZE_EXPAND_FILL);add_child(mc);diff --git a/editor/scene/connections_dialog.cpp b/editor/scene/connections_dialog.cppindex 0f73dfa7b8d..9ce1929dcf2 100644--- a/editor/scene/connections_dialog.cpp+++ b/editor/scene/connections_dialog.cpp@@ -1758,7 +1758,7 @@ ConnectionsDock::ConnectionsDock() {holder->add_child(search_box);MarginContainer *mc = memnew(MarginContainer);- mc->set_theme_type_variation("NoBorderHorizontal");+ mc->set_theme_type_variation("NoBorderPanel");mc->set_v_size_flags(SIZE_EXPAND_FILL);holder->add_child(mc);diff --git a/editor/scene/group_settings_editor.cpp b/editor/scene/group_settings_editor.cppindex adaa8fd129b..df621b2f097 100644--- a/editor/scene/group_settings_editor.cpp+++ b/editor/scene/group_settings_editor.cpp@@ -528,7 +528,7 @@ GroupSettingsEditor::GroupSettingsEditor() {hbc->add_child(add_button);MarginContainer *mc = memnew(MarginContainer);- mc->set_theme_type_variation("NoBorderHorizontalBottomWide");+ mc->set_theme_type_variation("NoBorderBottomWideWindow");mc->set_v_size_flags(SIZE_EXPAND_FILL);add_child(mc);diff --git a/editor/settings/action_map_editor.cpp b/editor/settings/action_map_editor.cppindex e3b49718371..29c01826fd1 100644--- a/editor/settings/action_map_editor.cpp+++ b/editor/settings/action_map_editor.cpp@@ -624,7 +624,7 @@ ActionMapEditor::ActionMapEditor() {MarginContainer *mc = memnew(MarginContainer);mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);- mc->set_theme_type_variation("NoBorderActionEditor");+ mc->set_theme_type_variation("NoBorderBottomPanel");main_vbox->add_child(mc);// Action Editor Treediff --git a/editor/settings/editor_autoload_settings.cpp b/editor/settings/editor_autoload_settings.cppindex 4002af86d3c..8226cce94a4 100644--- a/editor/settings/editor_autoload_settings.cpp+++ b/editor/settings/editor_autoload_settings.cpp@@ -891,7 +891,7 @@ EditorAutoloadSettings::EditorAutoloadSettings() {MarginContainer *mc = memnew(MarginContainer);mc->set_v_size_flags(SIZE_EXPAND_FILL);- mc->set_theme_type_variation("NoBorderHorizontalBottomWide");+ mc->set_theme_type_variation("NoBorderBottomWideWindow");add_child(mc);tree = memnew(Tree);diff --git a/editor/settings/editor_settings_dialog.cpp b/editor/settings/editor_settings_dialog.cppindex 327bc1d80f0..90cc1cc9e4d 100644--- a/editor/settings/editor_settings_dialog.cpp+++ b/editor/settings/editor_settings_dialog.cpp@@ -1050,7 +1050,7 @@ EditorSettingsDialog::EditorSettingsDialog() {MarginContainer *mc = memnew(MarginContainer);mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);- mc->set_theme_type_variation("NoBorderHorizontalBottom");+ mc->set_theme_type_variation("NoBorderBottomPanel");tab_shortcuts->add_child(mc);shortcuts = memnew(Tree);diff --git a/editor/shader/shader_globals_editor.cpp b/editor/shader/shader_globals_editor.cppindex a6b4eae7662..d34961ac851 100644--- a/editor/shader/shader_globals_editor.cpp+++ b/editor/shader/shader_globals_editor.cpp@@ -492,7 +492,7 @@ ShaderGlobalsEditor::ShaderGlobalsEditor() {variable_add->connect(SceneStringName(pressed), callable_mp(this, &ShaderGlobalsEditor::_variable_added));MarginContainer *mc = memnew(MarginContainer);- mc->set_theme_type_variation("NoBorderHorizontalBottomWide");+ mc->set_theme_type_variation("NoBorderBottomWideWindow");mc->set_v_size_flags(SIZE_EXPAND_FILL);add_child(mc);diff --git a/editor/themes/theme_modern.cpp b/editor/themes/theme_modern.cppindex ca7ab4126e3..e74ff61bb7c 100644--- a/editor/themes/theme_modern.cpp+++ b/editor/themes/theme_modern.cpp@@ -2080,16 +2080,13 @@ void ThemeModern::populate_editor_styles(const Ref<EditorTheme> &p_theme, Editorp_theme->set_constant("margin_right", "NoBorderAssetLibProjectManagerHorizontal", margin);int bottom_panel_margin = p_theme->get_stylebox(SNAME("BottomPanel"), EditorStringName(EditorStyles))->get_content_margin(SIDE_LEFT);- margin = -panel_margin - bottom_panel_margin;- // Used in the animation track editor.- p_theme->set_type_variation("NoBorderAnimation", "MarginContainer");- p_theme->set_constant("margin_left", "NoBorderAnimation", margin);- p_theme->set_constant("margin_right", "NoBorderAnimation", margin);+ p_theme->set_type_variation("NoBorderPanel", "MarginContainer");+ p_theme->set_constant("margin_left", "NoBorderPanel", -bottom_panel_margin);+ p_theme->set_constant("margin_right", "NoBorderPanel", -bottom_panel_margin);- // Used in the OpenXR action map editor.- p_theme->set_type_variation("NoBorderOpenXR", "NoBorderAnimation");- p_theme->set_constant("margin_bottom", "NoBorderOpenXR", -panel_margin);+ p_theme->set_type_variation("NoBorderBottomPanel", "NoBorderPanel");+ p_theme->set_constant("margin_bottom", "NoBorderBottomPanel", -bottom_panel_margin);margin = -p_theme->get_stylebox(SceneStringName(panel), SNAME("AcceptDialog"))->get_content_margin(SIDE_LEFT);@@ -2097,18 +2094,20 @@ void ThemeModern::populate_editor_styles(const Ref<EditorTheme> &p_theme, Editorp_theme->set_constant("margin_left", "NoBorderHorizontalWindow", margin);p_theme->set_constant("margin_right", "NoBorderHorizontalWindow", margin);- // Used in nested containers.- p_theme->set_type_variation("NoBorderHorizontalWide", "MarginContainer");- p_theme->set_constant("margin_left", "NoBorderHorizontalWide", margin);- p_theme->set_constant("margin_right", "NoBorderHorizontalWide", margin);+ margin = 2 * -bottom_panel_margin;// Same as above, including the bottom.- p_theme->set_type_variation("NoBorderHorizontalBottomWide", "NoBorderHorizontalWide");- p_theme->set_constant("margin_bottom", "NoBorderHorizontalBottomWide", 2 * -bottom_panel_margin);+ p_theme->set_type_variation("NoBorderBottomWideWindow", "NoBorderHorizontalWindow");+ p_theme->set_constant("margin_bottom", "NoBorderBottomWideWindow", margin);- // Used in the action map editor.- p_theme->set_type_variation("NoBorderActionEditor", "NoBorderHorizontalWide");- p_theme->set_constant("margin_bottom", "NoBorderActionEditor", -bottom_panel_margin);+ // Used in the animation track editor.+ p_theme->set_type_variation("NoBorderAnimation", "MarginContainer");+ p_theme->set_constant("margin_left", "NoBorderAnimation", margin);+ p_theme->set_constant("margin_right", "NoBorderAnimation", margin);++ // Used in the OpenXR action map editor.+ p_theme->set_type_variation("NoBorderOpenXR", "NoBorderAnimation");+ p_theme->set_constant("margin_bottom", "NoBorderOpenXR", -panel_margin);}// Buttons in material previews.diff --git a/editor/translations/localization_editor.cpp b/editor/translations/localization_editor.cppindex ccd1e899531..a463ef6c991 100644--- a/editor/translations/localization_editor.cpp+++ b/editor/translations/localization_editor.cpp@@ -770,7 +770,7 @@ LocalizationEditor::LocalizationEditor() {thb->add_child(addtr);MarginContainer *mc = memnew(MarginContainer);- mc->set_theme_type_variation("NoBorderHorizontalBottomWide");+ mc->set_theme_type_variation("NoBorderBottomWideWindow");mc->set_v_size_flags(SIZE_EXPAND_FILL);tvb->add_child(mc);@@ -808,7 +808,7 @@ LocalizationEditor::LocalizationEditor() {thb->add_child(addtr);MarginContainer *mc = memnew(MarginContainer);- mc->set_theme_type_variation("NoBorderHorizontalWide");+ mc->set_theme_type_variation("NoBorderHorizontalWindow");mc->set_v_size_flags(SIZE_EXPAND_FILL);tvb->add_child(mc);@@ -836,7 +836,7 @@ LocalizationEditor::LocalizationEditor() {thb->add_child(addtr);mc = memnew(MarginContainer);- mc->set_theme_type_variation("NoBorderHorizontalBottomWide");+ mc->set_theme_type_variation("NoBorderBottomWideWindow");mc->set_v_size_flags(SIZE_EXPAND_FILL);tvb->add_child(mc);@@ -885,7 +885,7 @@ LocalizationEditor::LocalizationEditor() {thb->add_child(template_generate_button);MarginContainer *mc = memnew(MarginContainer);- mc->set_theme_type_variation("NoBorderHorizontalWide");+ mc->set_theme_type_variation("NoBorderHorizontalWindow");mc->set_v_size_flags(SIZE_EXPAND_FILL);tvb->add_child(mc);diff --git a/modules/openxr/editor/openxr_action_map_editor.cpp b/modules/openxr/editor/openxr_action_map_editor.cppindex 6b15753b3cd..80ebd431e73 100644--- a/modules/openxr/editor/openxr_action_map_editor.cpp+++ b/modules/openxr/editor/openxr_action_map_editor.cpp@@ -77,7 +77,7 @@ void OpenXRActionMapEditor::_notification(int p_what) {void OpenXRActionMapEditor::update_layout(EditorDock::DockLayout p_layout, EditorDock::DockSlot p_slot) {if (p_slot != EditorDock::DOCK_SLOT_BOTTOM) {- actionsets_mc->set_theme_type_variation("NoBorderHorizontalBottomWide");+ actionsets_mc->set_theme_type_variation("NoBorderBottomWideWindow");actionsets_scroll->set_scroll_hint_mode(ScrollContainer::SCROLL_HINT_MODE_TOP_AND_LEFT);} else {actionsets_mc->set_theme_type_variation("NoBorderOpenXR");