diff options
Diffstat (limited to 'editor')
49 files changed, 119 insertions, 105 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index e64fc6e9e3..e3b1288e9f 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -2411,7 +2411,7 @@ void AnimationTrackEdit::draw_key(int p_index, float p_pixels_sec, int p_x, bool draw_texture( icon_to_draw, ofs, - p_index == hovering_key_idx ? get_theme_color(SNAME("folder_icon_modulate"), SNAME("FileDialog")) : Color(1, 1, 1)); + p_index == hovering_key_idx ? get_theme_color(SNAME("folder_icon_color"), SNAME("FileDialog")) : Color(1, 1, 1)); } // Helper. @@ -3518,7 +3518,7 @@ void AnimationTrackEditor::set_root(Node *p_root) { root = p_root; if (root) { - root->connect("tree_exiting", callable_mp(this, &AnimationTrackEditor::_root_removed), CONNECT_ONESHOT); + root->connect("tree_exiting", callable_mp(this, &AnimationTrackEditor::_root_removed), CONNECT_ONE_SHOT); } _update_tracks(); @@ -4766,7 +4766,7 @@ void AnimationTrackEditor::_notification(int p_what) { view_group->set_icon(get_theme_icon(view_group->is_pressed() ? SNAME("AnimationTrackList") : SNAME("AnimationTrackGroup"), SNAME("EditorIcons"))); selected_filter->set_icon(get_theme_icon(SNAME("AnimationFilter"), SNAME("EditorIcons"))); imported_anim_warning->set_icon(get_theme_icon(SNAME("NodeWarning"), SNAME("EditorIcons"))); - main_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + main_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); edit->get_popup()->set_item_icon(edit->get_popup()->get_item_index(EDIT_APPLY_RESET), get_theme_icon(SNAME("Reload"), SNAME("EditorIcons"))); } break; diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 2d5e70e1ff..9aa913a892 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1001,7 +1001,7 @@ void CodeTextEditor::update_editor_settings() { // Appearance: Caret text_editor->set_caret_type((TextEdit::CaretType)EditorSettings::get_singleton()->get("text_editor/appearance/caret/type").operator int()); text_editor->set_caret_blink_enabled(EditorSettings::get_singleton()->get("text_editor/appearance/caret/caret_blink")); - text_editor->set_caret_blink_speed(EditorSettings::get_singleton()->get("text_editor/appearance/caret/caret_blink_speed")); + text_editor->set_caret_blink_interval(EditorSettings::get_singleton()->get("text_editor/appearance/caret/caret_blink_interval")); text_editor->set_highlight_current_line(EditorSettings::get_singleton()->get("text_editor/appearance/caret/highlight_current_line")); text_editor->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/appearance/caret/highlight_all_occurrences")); diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 7de308fca8..861d05f17a 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -322,7 +322,7 @@ void ConnectDialog::init(ConnectionData p_cd, bool p_edit) { _update_ok_enabled(); bool b_deferred = (p_cd.flags & CONNECT_DEFERRED) == CONNECT_DEFERRED; - bool b_oneshot = (p_cd.flags & CONNECT_ONESHOT) == CONNECT_ONESHOT; + bool b_oneshot = (p_cd.flags & CONNECT_ONE_SHOT) == CONNECT_ONE_SHOT; deferred->set_pressed(b_deferred); one_shot->set_pressed(b_oneshot); @@ -565,7 +565,7 @@ void ConnectionsDock::_make_or_edit_connection() { } bool b_deferred = connect_dialog->get_deferred(); bool b_oneshot = connect_dialog->get_one_shot(); - cd.flags = CONNECT_PERSIST | (b_deferred ? CONNECT_DEFERRED : 0) | (b_oneshot ? CONNECT_ONESHOT : 0); + cd.flags = CONNECT_PERSIST | (b_deferred ? CONNECT_DEFERRED : 0) | (b_oneshot ? CONNECT_ONE_SHOT : 0); // Conditions to add function: must have a script and must not have the method already // (in the class, the script itself, or inherited). @@ -1083,8 +1083,8 @@ void ConnectionsDock::update_tree() { if (cd.flags & CONNECT_DEFERRED) { path += " (deferred)"; } - if (cd.flags & CONNECT_ONESHOT) { - path += " (oneshot)"; + if (cd.flags & CONNECT_ONE_SHOT) { + path += " (one-shot)"; } if (cd.unbinds > 0) { path += " unbinds(" + itos(cd.unbinds) + ")"; diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index b1253ed7cb..99821d8983 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -1027,7 +1027,7 @@ void EditorAudioBuses::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: case NOTIFICATION_THEME_CHANGED: { - bus_scroll->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + bus_scroll->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); } break; case NOTIFICATION_READY: { diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 231ae198d2..1febec2c04 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -1056,7 +1056,7 @@ void EditorSelection::add_node(Node *p_node) { } selection[p_node] = meta; - p_node->connect("tree_exiting", callable_mp(this, &EditorSelection::_node_removed).bind(p_node), CONNECT_ONESHOT); + p_node->connect("tree_exiting", callable_mp(this, &EditorSelection::_node_removed).bind(p_node), CONNECT_ONE_SHOT); } void EditorSelection::remove_node(Node *p_node) { diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp index 3bb050ce77..f464ca3b3c 100644 --- a/editor/editor_dir_dialog.cpp +++ b/editor/editor_dir_dialog.cpp @@ -44,7 +44,7 @@ void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p p_item->set_metadata(0, p_dir->get_path()); p_item->set_icon(0, tree->get_theme_icon(SNAME("Folder"), SNAME("EditorIcons"))); - p_item->set_icon_modulate(0, tree->get_theme_color(SNAME("folder_icon_modulate"), SNAME("FileDialog"))); + p_item->set_icon_modulate(0, tree->get_theme_color(SNAME("folder_icon_color"), SNAME("FileDialog"))); if (!p_item->get_parent()) { p_item->set_text(0, "res://"); diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index c953efc528..36ca1619a4 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -84,7 +84,7 @@ void EditorFileDialog::_update_theme_item_cache() { theme_cache.favorites_down = get_theme_icon(SNAME("MoveDown"), SNAME("EditorIcons")); theme_cache.folder = get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")); - theme_cache.folder_icon_modulate = get_theme_color(SNAME("folder_icon_modulate"), SNAME("FileDialog")); + theme_cache.folder_icon_color = get_theme_color(SNAME("folder_icon_color"), SNAME("FileDialog")); theme_cache.action_copy = get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")); theme_cache.action_delete = get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")); @@ -839,7 +839,7 @@ void EditorFileDialog::update_file_list() { d["dir"] = true; item_list->set_item_metadata(-1, d); - item_list->set_item_icon_modulate(-1, theme_cache.folder_icon_modulate); + item_list->set_item_icon_modulate(-1, theme_cache.folder_icon_color); dirs.pop_front(); } @@ -1385,7 +1385,7 @@ void EditorFileDialog::_update_favorites() { for (int i = 0; i < favorited_paths.size(); i++) { favorites->add_item(favorited_names[i], theme_cache.folder); favorites->set_item_metadata(-1, favorited_paths[i]); - favorites->set_item_icon_modulate(-1, theme_cache.folder_icon_modulate); + favorites->set_item_icon_modulate(-1, theme_cache.folder_icon_color); if (i == current_favorite) { favorite->set_pressed(true); @@ -1468,7 +1468,7 @@ void EditorFileDialog::_update_recent() { for (int i = 0; i < recentd_paths.size(); i++) { recent->add_item(recentd_names[i], theme_cache.folder); recent->set_item_metadata(-1, recentd_paths[i]); - recent->set_item_icon_modulate(-1, theme_cache.folder_icon_modulate); + recent->set_item_icon_modulate(-1, theme_cache.folder_icon_color); } EditorSettings::get_singleton()->set_recent_dirs(recentd); } diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h index 528050ba4f..6d11cb10ed 100644 --- a/editor/editor_file_dialog.h +++ b/editor/editor_file_dialog.h @@ -161,7 +161,7 @@ private: Ref<Texture2D> favorites_down; Ref<Texture2D> folder; - Color folder_icon_modulate; + Color folder_icon_color; Ref<Texture2D> action_copy; Ref<Texture2D> action_delete; diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 77110044ec..c1a7b15121 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -3487,9 +3487,9 @@ void EditorInspector::_update_inspector_bg() { n = n->get_parent(); } count_subinspectors = MIN(15, count_subinspectors); - add_theme_style_override("bg", get_theme_stylebox("sub_inspector_bg" + itos(count_subinspectors), SNAME("Editor"))); + add_theme_style_override("panel", get_theme_stylebox("sub_inspector_bg" + itos(count_subinspectors), SNAME("Editor"))); } else { - add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); } } void EditorInspector::set_sub_inspector(bool p_enable) { diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 2c96b6209f..96b229b7ee 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3095,14 +3095,14 @@ void EditorNode::_screenshot(bool p_use_utc) { } void EditorNode::_save_screenshot(NodePath p_path) { - Control *editor_main_control = EditorInterface::get_singleton()->get_editor_main_control(); - ERR_FAIL_COND_MSG(!editor_main_control, "Cannot get editor main control."); - Viewport *viewport = editor_main_control->get_viewport(); - ERR_FAIL_COND_MSG(!viewport, "Cannot get editor main control viewport."); + Control *editor_main_screen = EditorInterface::get_singleton()->get_editor_main_screen(); + ERR_FAIL_COND_MSG(!editor_main_screen, "Cannot get the editor main screen control."); + Viewport *viewport = editor_main_screen->get_viewport(); + ERR_FAIL_COND_MSG(!viewport, "Cannot get a viewport from the editor main screen."); Ref<ViewportTexture> texture = viewport->get_texture(); - ERR_FAIL_COND_MSG(texture.is_null(), "Cannot get editor main control viewport texture."); + ERR_FAIL_COND_MSG(texture.is_null(), "Cannot get a viewport texture from the editor main screen."); Ref<Image> img = texture->get_image(); - ERR_FAIL_COND_MSG(img.is_null(), "Cannot get editor main control viewport texture image."); + ERR_FAIL_COND_MSG(img.is_null(), "Cannot get an image from a viewport texture of the editor main screen."); Error error = img->save_png(p_path); ERR_FAIL_COND_MSG(error != OK, "Cannot save screenshot to file '" + p_path + "'."); } @@ -3286,8 +3286,8 @@ void EditorNode::_update_file_menu_closed() { file_menu->set_item_disabled(file_menu->get_item_index(FILE_OPEN_PREV), false); } -Control *EditorNode::get_main_control() { - return main_control; +VBoxContainer *EditorNode::get_main_screen_control() { + return main_screen_vbox; } void EditorNode::_editor_select(int p_which) { @@ -6583,10 +6583,11 @@ EditorNode::EditorNode() { scene_root->set_disable_input(true); scene_root->set_as_audio_listener_2d(true); - main_control = memnew(VBoxContainer); - main_control->set_v_size_flags(Control::SIZE_EXPAND_FILL); - main_control->add_theme_constant_override("separation", 0); - scene_root_parent->add_child(main_control); + main_screen_vbox = memnew(VBoxContainer); + main_screen_vbox->set_name("MainScreen"); + main_screen_vbox->set_v_size_flags(Control::SIZE_EXPAND_FILL); + main_screen_vbox->add_theme_constant_override("separation", 0); + scene_root_parent->add_child(main_screen_vbox); bool global_menu = !bool(EDITOR_GET("interface/editor/use_embedded_menu")) && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_GLOBAL_MENU); bool can_expand = bool(EDITOR_GET("interface/editor/expand_to_title")) && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_EXTEND_TO_TITLE); diff --git a/editor/editor_node.h b/editor/editor_node.h index c3b4c985cc..df3d2ae0f8 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -323,7 +323,7 @@ private: Control *vp_base = nullptr; EditorTitleBar *menu_hb = nullptr; - Control *main_control = nullptr; + VBoxContainer *main_screen_vbox = nullptr; MenuBar *main_menu = nullptr; PopupMenu *file_menu = nullptr; PopupMenu *project_menu = nullptr; @@ -788,7 +788,7 @@ public: bool is_changing_scene() const; - Control *get_main_control(); + VBoxContainer *get_main_screen_control(); SubViewport *get_scene_root() { return scene_root; } // Root of the scene being edited. void set_edited_scene(Node *p_scene); diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 1efbb7e40f..f3ac8f4ba0 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -156,8 +156,8 @@ void EditorInterface::set_main_screen_editor(const String &p_name) { EditorNode::get_singleton()->select_editor_by_name(p_name); } -Control *EditorInterface::get_editor_main_control() { - return EditorNode::get_singleton()->get_main_control(); +VBoxContainer *EditorInterface::get_editor_main_screen() { + return EditorNode::get_singleton()->get_main_screen_control(); } void EditorInterface::edit_resource(const Ref<Resource> &p_resource) { @@ -352,7 +352,7 @@ void EditorInterface::_bind_methods() { ClassDB::bind_method(D_METHOD("get_edited_scene_root"), &EditorInterface::get_edited_scene_root); ClassDB::bind_method(D_METHOD("get_resource_previewer"), &EditorInterface::get_resource_previewer); ClassDB::bind_method(D_METHOD("get_resource_filesystem"), &EditorInterface::get_resource_file_system); - ClassDB::bind_method(D_METHOD("get_editor_main_control"), &EditorInterface::get_editor_main_control); + ClassDB::bind_method(D_METHOD("get_editor_main_screen"), &EditorInterface::get_editor_main_screen); ClassDB::bind_method(D_METHOD("make_mesh_previews", "meshes", "preview_size"), &EditorInterface::_make_mesh_previews); ClassDB::bind_method(D_METHOD("select_file", "file"), &EditorInterface::select_file); ClassDB::bind_method(D_METHOD("get_selected_path"), &EditorInterface::get_selected_path); diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index 1d6f48caa3..fe01524bea 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -72,7 +72,7 @@ protected: public: static EditorInterface *get_singleton() { return singleton; } - Control *get_editor_main_control(); + VBoxContainer *get_editor_main_screen(); void edit_resource(const Ref<Resource> &p_resource); void edit_node(Node *p_node); void edit_script(const Ref<Script> &p_script, int p_line = -1, int p_col = 0, bool p_grab_focus = true); diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index f717188b3b..5346052f4d 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -769,7 +769,7 @@ void EditorResourcePicker::_notification(int p_what) { } break; case NOTIFICATION_DRAW: { - draw_style_box(get_theme_stylebox(SNAME("bg"), SNAME("Tree")), Rect2(Point2(), get_size())); + draw_style_box(get_theme_stylebox(SNAME("panel"), SNAME("Tree")), Rect2(Point2(), get_size())); } break; case NOTIFICATION_DRAG_BEGIN: { diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 73acab3876..5dd0a1052a 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -510,7 +510,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // Appearance: Caret EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/appearance/caret/type", 0, "Line,Block") _initial_set("text_editor/appearance/caret/caret_blink", true); - EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "text_editor/appearance/caret/caret_blink_speed", 0.5, "0.1,10,0.01") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "text_editor/appearance/caret/caret_blink_interval", 0.5, "0.1,10,0.01") _initial_set("text_editor/appearance/caret/highlight_current_line", true); _initial_set("text_editor/appearance/caret/highlight_all_occurrences", true); diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp index d190ab57c3..9b8d46a923 100644 --- a/editor/editor_settings_dialog.cpp +++ b/editor/editor_settings_dialog.cpp @@ -193,7 +193,7 @@ void EditorSettingsDialog::_update_icons() { shortcut_search_box->set_clear_button_enabled(true); restart_close_button->set_icon(shortcuts->get_theme_icon(SNAME("Close"), SNAME("EditorIcons"))); - restart_container->add_theme_style_override("panel", shortcuts->get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + restart_container->add_theme_style_override("panel", shortcuts->get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); restart_icon->set_texture(shortcuts->get_theme_icon(SNAME("StatusWarning"), SNAME("EditorIcons"))); restart_label->add_theme_color_override("font_color", shortcuts->get_theme_color(SNAME("warning_color"), SNAME("Editor"))); } diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 6934c2d13c..5bf79635b8 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -894,15 +894,15 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("hover", "CheckButton", style_menu); theme->set_stylebox("hover_pressed", "CheckButton", style_menu); - theme->set_icon("on", "CheckButton", theme->get_icon(SNAME("GuiToggleOn"), SNAME("EditorIcons"))); - theme->set_icon("on_disabled", "CheckButton", theme->get_icon(SNAME("GuiToggleOnDisabled"), SNAME("EditorIcons"))); - theme->set_icon("off", "CheckButton", theme->get_icon(SNAME("GuiToggleOff"), SNAME("EditorIcons"))); - theme->set_icon("off_disabled", "CheckButton", theme->get_icon(SNAME("GuiToggleOffDisabled"), SNAME("EditorIcons"))); + theme->set_icon("checked", "CheckButton", theme->get_icon(SNAME("GuiToggleOn"), SNAME("EditorIcons"))); + theme->set_icon("checked_disabled", "CheckButton", theme->get_icon(SNAME("GuiToggleOnDisabled"), SNAME("EditorIcons"))); + theme->set_icon("unchecked", "CheckButton", theme->get_icon(SNAME("GuiToggleOff"), SNAME("EditorIcons"))); + theme->set_icon("unchecked_disabled", "CheckButton", theme->get_icon(SNAME("GuiToggleOffDisabled"), SNAME("EditorIcons"))); - theme->set_icon("on_mirrored", "CheckButton", theme->get_icon(SNAME("GuiToggleOnMirrored"), SNAME("EditorIcons"))); - theme->set_icon("on_disabled_mirrored", "CheckButton", theme->get_icon(SNAME("GuiToggleOnDisabledMirrored"), SNAME("EditorIcons"))); - theme->set_icon("off_mirrored", "CheckButton", theme->get_icon(SNAME("GuiToggleOffMirrored"), SNAME("EditorIcons"))); - theme->set_icon("off_disabled_mirrored", "CheckButton", theme->get_icon(SNAME("GuiToggleOffDisabledMirrored"), SNAME("EditorIcons"))); + theme->set_icon("checked_mirrored", "CheckButton", theme->get_icon(SNAME("GuiToggleOnMirrored"), SNAME("EditorIcons"))); + theme->set_icon("checked_disabled_mirrored", "CheckButton", theme->get_icon(SNAME("GuiToggleOnDisabledMirrored"), SNAME("EditorIcons"))); + theme->set_icon("unchecked_mirrored", "CheckButton", theme->get_icon(SNAME("GuiToggleOffMirrored"), SNAME("EditorIcons"))); + theme->set_icon("unchecked_disabled_mirrored", "CheckButton", theme->get_icon(SNAME("GuiToggleOffDisabledMirrored"), SNAME("EditorIcons"))); theme->set_color("font_color", "CheckButton", font_color); theme->set_color("font_hover_color", "CheckButton", font_hover_color); @@ -918,7 +918,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("icon_disabled_color", "CheckButton", icon_disabled_color); theme->set_constant("h_separation", "CheckButton", 8 * EDSCALE); - theme->set_constant("check_v_adjust", "CheckButton", 0 * EDSCALE); + theme->set_constant("check_v_offset", "CheckButton", 0 * EDSCALE); // Checkbox Ref<StyleBoxFlat> sb_checkbox = style_menu->duplicate(); @@ -955,7 +955,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("icon_disabled_color", "CheckBox", icon_disabled_color); theme->set_constant("h_separation", "CheckBox", 8 * EDSCALE); - theme->set_constant("check_v_adjust", "CheckBox", 0 * EDSCALE); + theme->set_constant("check_v_offset", "CheckBox", 0 * EDSCALE); // PopupDialog theme->set_stylebox("panel", "PopupDialog", style_popup); @@ -1095,7 +1095,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { // Make Trees easier to distinguish from other controls by using a darker background color. style_tree_bg->set_bg_color(dark_color_1.lerp(dark_color_2, 0.5)); style_tree_bg->set_border_color(dark_color_3); - theme->set_stylebox("bg", "Tree", style_tree_bg); + theme->set_stylebox("panel", "Tree", style_tree_bg); // Tree theme->set_icon("checked", "Tree", theme->get_icon(SNAME("GuiChecked"), SNAME("EditorIcons"))); @@ -1106,7 +1106,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_icon("arrow_collapsed_mirrored", "Tree", theme->get_icon(SNAME("GuiTreeArrowLeft"), SNAME("EditorIcons"))); theme->set_icon("updown", "Tree", theme->get_icon(SNAME("GuiTreeUpdown"), SNAME("EditorIcons"))); theme->set_icon("select_arrow", "Tree", theme->get_icon(SNAME("GuiDropdown"), SNAME("EditorIcons"))); - theme->set_stylebox("bg_focus", "Tree", style_widget_focus); + theme->set_stylebox("focus", "Tree", style_widget_focus); theme->set_stylebox("custom_button", "Tree", make_empty_stylebox()); theme->set_stylebox("custom_button_pressed", "Tree", make_empty_stylebox()); theme->set_stylebox("custom_button_hover", "Tree", style_widget); @@ -1197,12 +1197,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { style_itemlist_cursor->set_draw_center(false); style_itemlist_cursor->set_border_width_all(border_width); style_itemlist_cursor->set_border_color(highlight_color); + theme->set_stylebox("panel", "ItemList", style_itemlist_bg); + theme->set_stylebox("focus", "ItemList", style_widget_focus); theme->set_stylebox("cursor", "ItemList", style_itemlist_cursor); theme->set_stylebox("cursor_unfocused", "ItemList", style_itemlist_cursor); theme->set_stylebox("selected_focus", "ItemList", style_tree_focus); theme->set_stylebox("selected", "ItemList", style_tree_selected); - theme->set_stylebox("bg_focus", "ItemList", style_widget_focus); - theme->set_stylebox("bg", "ItemList", style_itemlist_bg); theme->set_color("font_color", "ItemList", font_color); theme->set_color("font_selected_color", "ItemList", mono_color); theme->set_color("guide_color", "ItemList", guide_color); @@ -1420,6 +1420,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { // AcceptDialog theme->set_stylebox("panel", "AcceptDialog", style_window_title); + theme->set_constant("buttons_separation", "AcceptDialog", 8 * EDSCALE); // HScrollBar Ref<Texture2D> empty_icon = memnew(ImageTexture); @@ -1547,8 +1548,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_icon("updown_disabled", "SpinBox", theme->get_icon(SNAME("GuiSpinboxUpdownDisabled"), SNAME("EditorIcons"))); // ProgressBar - theme->set_stylebox("bg", "ProgressBar", make_stylebox(theme->get_icon(SNAME("GuiProgressBar"), SNAME("EditorIcons")), 4, 4, 4, 4, 0, 0, 0, 0)); - theme->set_stylebox("fg", "ProgressBar", make_stylebox(theme->get_icon(SNAME("GuiProgressFill"), SNAME("EditorIcons")), 6, 6, 6, 6, 2, 1, 2, 1)); + theme->set_stylebox("background", "ProgressBar", make_stylebox(theme->get_icon(SNAME("GuiProgressBar"), SNAME("EditorIcons")), 4, 4, 4, 4, 0, 0, 0, 0)); + theme->set_stylebox("fill", "ProgressBar", make_stylebox(theme->get_icon(SNAME("GuiProgressFill"), SNAME("EditorIcons")), 6, 6, 6, 6, 2, 1, 2, 1)); theme->set_color("font_color", "ProgressBar", font_color); // GraphEdit @@ -1694,7 +1695,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_icon("toggle_hidden", "FileDialog", theme->get_icon(SNAME("GuiVisibilityVisible"), SNAME("EditorIcons"))); // Use a different color for folder icons to make them easier to distinguish from files. // On a light theme, the icon will be dark, so we need to lighten it before blending it with the accent color. - theme->set_color("folder_icon_modulate", "FileDialog", (dark_theme ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25)).lerp(accent_color, 0.7)); + theme->set_color("folder_icon_color", "FileDialog", (dark_theme ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25)).lerp(accent_color, 0.7)); theme->set_color("files_disabled", "FileDialog", font_disabled_color); // ColorPicker diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp index 525a962222..2a444bb04f 100644 --- a/editor/export/editor_export_platform.cpp +++ b/editor/export/editor_export_platform.cpp @@ -287,7 +287,7 @@ Error EditorExportPlatform::_save_zip_file(void *p_userdata, const String &p_pat Ref<ImageTexture> EditorExportPlatform::get_option_icon(int p_index) const { Ref<Theme> theme = EditorNode::get_singleton()->get_editor_theme(); ERR_FAIL_COND_V(theme.is_null(), Ref<ImageTexture>()); - if (EditorNode::get_singleton()->get_main_control()->is_layout_rtl()) { + if (EditorNode::get_singleton()->get_main_screen_control()->is_layout_rtl()) { return theme->get_icon(SNAME("PlayBackwards"), SNAME("EditorIcons")); } else { return theme->get_icon(SNAME("Play"), SNAME("EditorIcons")); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 19788e70da..ef8173eae4 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -76,7 +76,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory subdirectory_item->set_text(0, dname); subdirectory_item->set_structured_text_bidi_override(0, TextServer::STRUCTURED_TEXT_FILE); subdirectory_item->set_icon(0, get_theme_icon(SNAME("Folder"), SNAME("EditorIcons"))); - subdirectory_item->set_icon_modulate(0, get_theme_color(SNAME("folder_icon_modulate"), SNAME("FileDialog"))); + subdirectory_item->set_icon_modulate(0, get_theme_color(SNAME("folder_icon_color"), SNAME("FileDialog"))); subdirectory_item->set_selectable(0, true); String lpath = p_dir->get_path(); subdirectory_item->set_metadata(0, lpath); @@ -246,7 +246,7 @@ void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, boo } Ref<Texture2D> folder_icon = get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")); - const Color folder_color = get_theme_color(SNAME("folder_icon_modulate"), SNAME("FileDialog")); + const Color folder_color = get_theme_color(SNAME("folder_icon_color"), SNAME("FileDialog")); String text; Ref<Texture2D> icon; @@ -778,7 +778,7 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) { } Ref<Texture2D> folder_icon = (use_thumbnails) ? folder_thumbnail : get_theme_icon(SNAME("folder"), SNAME("FileDialog")); - const Color folder_color = get_theme_color(SNAME("folder_icon_modulate"), SNAME("FileDialog")); + const Color folder_color = get_theme_color(SNAME("folder_icon_color"), SNAME("FileDialog")); // Build the FileInfo list. List<FileInfo> file_list; diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp index 405d8d2169..d1f37179f3 100644 --- a/editor/import/dynamic_font_import_settings.cpp +++ b/editor/import/dynamic_font_import_settings.cpp @@ -1343,8 +1343,8 @@ DynamicFontImportSettings::DynamicFontImportSettings() { for (int i = 0; i < 16; i++) { glyph_table->set_column_title(i + 1, String::num_int64(i, 16)); } - glyph_table->add_theme_style_override("selected", glyph_table->get_theme_stylebox(SNAME("bg"))); - glyph_table->add_theme_style_override("selected_focus", glyph_table->get_theme_stylebox(SNAME("bg"))); + glyph_table->add_theme_style_override("selected", glyph_table->get_theme_stylebox(SNAME("panel"))); + glyph_table->add_theme_style_override("selected_focus", glyph_table->get_theme_stylebox(SNAME("panel"))); glyph_table->add_theme_constant_override("h_separation", 0); glyph_table->set_h_size_flags(Control::SIZE_EXPAND_FILL); glyph_table->set_v_size_flags(Control::SIZE_EXPAND_FILL); diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp index b79f4c90bf..0e941ad433 100644 --- a/editor/plugins/animation_blend_space_1d_editor.cpp +++ b/editor/plugins/animation_blend_space_1d_editor.cpp @@ -552,9 +552,9 @@ void AnimationNodeBlendSpace1DEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: case NOTIFICATION_THEME_CHANGED: { - error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor"))); - panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); tool_blend->set_icon(get_theme_icon(SNAME("EditPivot"), SNAME("EditorIcons"))); tool_select->set_icon(get_theme_icon(SNAME("ToolSelect"), SNAME("EditorIcons"))); tool_create->set_icon(get_theme_icon(SNAME("EditKey"), SNAME("EditorIcons"))); diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp index 1646a1cef4..f75dcdf2d6 100644 --- a/editor/plugins/animation_blend_space_2d_editor.cpp +++ b/editor/plugins/animation_blend_space_2d_editor.cpp @@ -774,9 +774,9 @@ void AnimationNodeBlendSpace2DEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: case NOTIFICATION_THEME_CHANGED: { - error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor"))); - panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); tool_blend->set_icon(get_theme_icon(SNAME("EditPivot"), SNAME("EditorIcons"))); tool_select->set_icon(get_theme_icon(SNAME("ToolSelect"), SNAME("EditorIcons"))); tool_create->set_icon(get_theme_icon(SNAME("EditKey"), SNAME("EditorIcons"))); diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 8dd3223b19..e2d4c9fb6f 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -800,7 +800,7 @@ void AnimationNodeBlendTreeEditor::_update_editor_settings() { } void AnimationNodeBlendTreeEditor::_update_theme() { - error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor"))); } diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 6baeaf6273..461326a47b 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -1551,9 +1551,9 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: case NOTIFICATION_TRANSLATION_CHANGED: { - error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + error_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); error_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor"))); - panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); tool_select->set_icon(get_theme_icon(SNAME("ToolSelect"), SNAME("EditorIcons"))); tool_create->set_icon(get_theme_icon(SNAME("ToolAddNode"), SNAME("EditorIcons"))); diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index f7e5d81e5d..1231ac10ab 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -584,8 +584,8 @@ void EditorAssetLibrary::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { error_tr->set_texture(get_theme_icon(SNAME("Error"), SNAME("EditorIcons"))); filter->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons"))); - library_scroll_bg->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); - downloads_scroll->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + library_scroll_bg->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); + downloads_scroll->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); error_label->add_theme_color_override("color", get_theme_color(SNAME("error_color"), SNAME("Editor"))); } break; @@ -1617,7 +1617,7 @@ void AssetLibraryEditorPlugin::make_visible(bool p_visible) { AssetLibraryEditorPlugin::AssetLibraryEditorPlugin() { addon_library = memnew(EditorAssetLibrary); addon_library->set_v_size_flags(Control::SIZE_EXPAND_FILL); - EditorNode::get_singleton()->get_main_control()->add_child(addon_library); + EditorNode::get_singleton()->get_main_screen_control()->add_child(addon_library); addon_library->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT); addon_library->hide(); } diff --git a/editor/plugins/camera_3d_editor_plugin.cpp b/editor/plugins/camera_3d_editor_plugin.cpp index 141837244a..1aedb3b4ce 100644 --- a/editor/plugins/camera_3d_editor_plugin.cpp +++ b/editor/plugins/camera_3d_editor_plugin.cpp @@ -98,7 +98,7 @@ void Camera3DEditorPlugin::make_visible(bool p_visible) { Camera3DEditorPlugin::Camera3DEditorPlugin() { /* camera_editor = memnew( CameraEditor ); - EditorNode::get_singleton()->get_main_control()->add_child(camera_editor); + EditorNode::get_singleton()->get_main_screen_control()->add_child(camera_editor); camera_editor->set_anchor(SIDE_LEFT,Control::ANCHOR_END); camera_editor->set_anchor(SIDE_RIGHT,Control::ANCHOR_END); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index c4a32d6d4b..9deb516ec4 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -5459,7 +5459,7 @@ void CanvasItemEditorPlugin::set_state(const Dictionary &p_state) { CanvasItemEditorPlugin::CanvasItemEditorPlugin() { canvas_item_editor = memnew(CanvasItemEditor); canvas_item_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL); - EditorNode::get_singleton()->get_main_control()->add_child(canvas_item_editor); + EditorNode::get_singleton()->get_main_screen_control()->add_child(canvas_item_editor); canvas_item_editor->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT); canvas_item_editor->hide(); } diff --git a/editor/plugins/cpu_particles_3d_editor_plugin.cpp b/editor/plugins/cpu_particles_3d_editor_plugin.cpp index 775c2dbb2a..ad12b8bef0 100644 --- a/editor/plugins/cpu_particles_3d_editor_plugin.cpp +++ b/editor/plugins/cpu_particles_3d_editor_plugin.cpp @@ -126,7 +126,7 @@ void CPUParticles3DEditorPlugin::make_visible(bool p_visible) { CPUParticles3DEditorPlugin::CPUParticles3DEditorPlugin() { particles_editor = memnew(CPUParticles3DEditor); - EditorNode::get_singleton()->get_main_control()->add_child(particles_editor); + EditorNode::get_singleton()->get_main_screen_control()->add_child(particles_editor); particles_editor->hide(); } diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 0e84381279..8d1df0b32c 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -640,7 +640,7 @@ void CurveEditor::_draw() { // Background Vector2 view_size = get_rect().size; - draw_style_box(get_theme_stylebox(SNAME("bg"), SNAME("Tree")), Rect2(Point2(), view_size)); + draw_style_box(get_theme_stylebox(SNAME("panel"), SNAME("Tree")), Rect2(Point2(), view_size)); // Grid diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 0ec36736bd..59b8f31720 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -307,7 +307,7 @@ Ref<Texture2D> EditorMaterialPreviewPlugin::generate(const Ref<Resource> &p_from if (material->get_shader_mode() == Shader::MODE_SPATIAL) { RS::get_singleton()->mesh_surface_set_material(sphere, 0, material->get_rid()); - RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorMaterialPreviewPlugin *>(this), &EditorMaterialPreviewPlugin::_generate_frame_started), Object::CONNECT_ONESHOT); + RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorMaterialPreviewPlugin *>(this), &EditorMaterialPreviewPlugin::_generate_frame_started), Object::CONNECT_ONE_SHOT); preview_done.wait(); @@ -709,7 +709,7 @@ Ref<Texture2D> EditorMeshPreviewPlugin::generate(const Ref<Resource> &p_from, co xform.origin.z -= rot_aabb.size.z * 2; RS::get_singleton()->instance_set_transform(mesh_instance, xform); - RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorMeshPreviewPlugin *>(this), &EditorMeshPreviewPlugin::_generate_frame_started), Object::CONNECT_ONESHOT); + RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorMeshPreviewPlugin *>(this), &EditorMeshPreviewPlugin::_generate_frame_started), Object::CONNECT_ONE_SHOT); preview_done.wait(); @@ -826,7 +826,7 @@ Ref<Texture2D> EditorFontPreviewPlugin::generate_from_path(const String &p_path, const float fg = c.get_luminance() < 0.5 ? 1.0 : 0.0; sampled_font->draw_string(canvas_item, pos, sample, HORIZONTAL_ALIGNMENT_LEFT, -1.f, 50, Color(fg, fg, fg)); - RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorFontPreviewPlugin *>(this), &EditorFontPreviewPlugin::_generate_frame_started), Object::CONNECT_ONESHOT); + RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorFontPreviewPlugin *>(this), &EditorFontPreviewPlugin::_generate_frame_started), Object::CONNECT_ONE_SHOT); preview_done.wait(); diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp index ebc92bf531..d91cbb6571 100644 --- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp +++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp @@ -454,7 +454,7 @@ void GPUParticles3DEditorPlugin::make_visible(bool p_visible) { GPUParticles3DEditorPlugin::GPUParticles3DEditorPlugin() { particles_editor = memnew(GPUParticles3DEditor); - EditorNode::get_singleton()->get_main_control()->add_child(particles_editor); + EditorNode::get_singleton()->get_main_screen_control()->add_child(particles_editor); particles_editor->hide(); } diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp index 7bd406b869..c502d47669 100644 --- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp @@ -567,7 +567,7 @@ void MeshInstance3DEditorPlugin::make_visible(bool p_visible) { MeshInstance3DEditorPlugin::MeshInstance3DEditorPlugin() { mesh_editor = memnew(MeshInstance3DEditor); - EditorNode::get_singleton()->get_main_control()->add_child(mesh_editor); + EditorNode::get_singleton()->get_main_screen_control()->add_child(mesh_editor); mesh_editor->options->hide(); } diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index 319f6ee9de..420ebe5942 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -319,7 +319,7 @@ void MeshLibraryEditorPlugin::make_visible(bool p_visible) { MeshLibraryEditorPlugin::MeshLibraryEditorPlugin() { mesh_library_editor = memnew(MeshLibraryEditor); - EditorNode::get_singleton()->get_main_control()->add_child(mesh_library_editor); + EditorNode::get_singleton()->get_main_screen_control()->add_child(mesh_library_editor); mesh_library_editor->set_anchors_and_offsets_preset(Control::PRESET_TOP_WIDE); mesh_library_editor->set_end(Point2(0, 22)); mesh_library_editor->hide(); diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp index fc4dc5bc2f..b0e206b020 100644 --- a/editor/plugins/multimesh_editor_plugin.cpp +++ b/editor/plugins/multimesh_editor_plugin.cpp @@ -379,7 +379,7 @@ void MultiMeshEditorPlugin::make_visible(bool p_visible) { MultiMeshEditorPlugin::MultiMeshEditorPlugin() { multimesh_editor = memnew(MultiMeshEditor); - EditorNode::get_singleton()->get_main_control()->add_child(multimesh_editor); + EditorNode::get_singleton()->get_main_screen_control()->add_child(multimesh_editor); multimesh_editor->options->hide(); } diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 233ce92e4d..13fd406e87 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -8449,7 +8449,7 @@ void Node3DEditor::remove_gizmo_plugin(Ref<EditorNode3DGizmoPlugin> p_plugin) { Node3DEditorPlugin::Node3DEditorPlugin() { spatial_editor = memnew(Node3DEditor); spatial_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL); - EditorNode::get_singleton()->get_main_control()->add_child(spatial_editor); + EditorNode::get_singleton()->get_main_screen_control()->add_child(spatial_editor); spatial_editor->hide(); } diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index a652d1d12f..328ad0ccbc 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -94,8 +94,8 @@ void Polygon2DEditor::_notification(int p_what) { [[fallthrough]]; } case NOTIFICATION_THEME_CHANGED: { - uv_edit_draw->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); - bone_scroll->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + uv_edit_draw->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); + bone_scroll->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); } break; case NOTIFICATION_VISIBILITY_CHANGED: { diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index ad114e022f..953f72bd05 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -882,7 +882,7 @@ void ScriptEditor::_queue_close_tabs() { // Maybe there are unsaved changes. if (se->is_unsaved()) { _ask_close_current_unsaved_tab(se); - erase_tab_confirm->connect(SceneStringNames::get_singleton()->visibility_changed, callable_mp(this, &ScriptEditor::_queue_close_tabs), CONNECT_ONESHOT); + erase_tab_confirm->connect(SceneStringNames::get_singleton()->visibility_changed, callable_mp(this, &ScriptEditor::_queue_close_tabs), CONNECT_ONE_SHOT); break; } } @@ -4049,7 +4049,7 @@ void ScriptEditorPlugin::edited_scene_changed() { ScriptEditorPlugin::ScriptEditorPlugin() { script_editor = memnew(ScriptEditor); - EditorNode::get_singleton()->get_main_control()->add_child(script_editor); + EditorNode::get_singleton()->get_main_screen_control()->add_child(script_editor); script_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL); script_editor->hide(); diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp index 3dc068a72a..dbad81d743 100644 --- a/editor/plugins/skeleton_2d_editor_plugin.cpp +++ b/editor/plugins/skeleton_2d_editor_plugin.cpp @@ -131,7 +131,7 @@ void Skeleton2DEditorPlugin::make_visible(bool p_visible) { Skeleton2DEditorPlugin::Skeleton2DEditorPlugin() { sprite_editor = memnew(Skeleton2DEditor); - EditorNode::get_singleton()->get_main_control()->add_child(sprite_editor); + EditorNode::get_singleton()->get_main_screen_control()->add_child(sprite_editor); make_visible(false); //sprite_editor->options->hide(); diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 1facf04ca7..37d05e5fa7 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -835,7 +835,7 @@ void Skeleton3DEditor::_notification(int p_what) { skeleton->connect("show_rest_only_changed", callable_mp(this, &Skeleton3DEditor::_update_gizmo_visible)); #endif - get_tree()->connect("node_removed", callable_mp(this, &Skeleton3DEditor::_node_removed), Object::CONNECT_ONESHOT); + get_tree()->connect("node_removed", callable_mp(this, &Skeleton3DEditor::_node_removed), Object::CONNECT_ONE_SHOT); } break; case NOTIFICATION_READY: { // Will trigger NOTIFICATION_THEME_CHANGED, but won't cause any loops if called here. diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp index 615fd5dba9..b78b70cd5c 100644 --- a/editor/plugins/sprite_2d_editor_plugin.cpp +++ b/editor/plugins/sprite_2d_editor_plugin.cpp @@ -604,7 +604,7 @@ void Sprite2DEditorPlugin::make_visible(bool p_visible) { Sprite2DEditorPlugin::Sprite2DEditorPlugin() { sprite_editor = memnew(Sprite2DEditor); - EditorNode::get_singleton()->get_main_control()->add_child(sprite_editor); + EditorNode::get_singleton()->get_main_screen_control()->add_child(sprite_editor); make_visible(false); //sprite_editor->options->hide(); diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 9508835442..ae21aad337 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -428,7 +428,7 @@ void SpriteFramesEditor::_notification(int p_what) { split_sheet_zoom_out->set_icon(get_theme_icon(SNAME("ZoomLess"), SNAME("EditorIcons"))); split_sheet_zoom_reset->set_icon(get_theme_icon(SNAME("ZoomReset"), SNAME("EditorIcons"))); split_sheet_zoom_in->set_icon(get_theme_icon(SNAME("ZoomMore"), SNAME("EditorIcons"))); - split_sheet_scroll->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + split_sheet_scroll->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); } break; case NOTIFICATION_READY: { diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index f0e3619060..8e04391a94 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -823,7 +823,7 @@ void TextureRegionEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: case NOTIFICATION_THEME_CHANGED: { - edit_draw->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + edit_draw->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); } break; case NOTIFICATION_READY: { zoom_out->set_icon(get_theme_icon(SNAME("ZoomLess"), SNAME("EditorIcons"))); diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp index 87b5be1142..17115519e2 100644 --- a/editor/plugins/tiles/tiles_editor_plugin.cpp +++ b/editor/plugins/tiles/tiles_editor_plugin.cpp @@ -116,7 +116,7 @@ void TilesEditorPlugin::_thread() { // Add the viewport at the last moment to avoid rendering too early. EditorNode::get_singleton()->add_child(viewport); - RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<TilesEditorPlugin *>(this), &TilesEditorPlugin::_preview_frame_started), Object::CONNECT_ONESHOT); + RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<TilesEditorPlugin *>(this), &TilesEditorPlugin::_preview_frame_started), Object::CONNECT_ONE_SHOT); pattern_preview_done.wait(); diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp index c6b13fc410..ad08629cf2 100644 --- a/editor/project_converter_3_to_4.cpp +++ b/editor/project_converter_3_to_4.cpp @@ -91,6 +91,7 @@ static const char *enum_renames[][2] = { { "BUTTON_XBUTTON2", "MOUSE_BUTTON_XBUTTON2" }, // Globals { "CLEAR_MODE_ONLY_NEXT_FRAME", "CLEAR_MODE_ONCE" }, // SubViewport { "COMPRESS_PVRTC4", "COMPRESS_PVRTC1_4" }, // Image + { "CONNECT_ONESHOT", "CONNECT_ONE_SHOT" }, // Object { "CUBEMAP_BACK", "CUBEMAP_LAYER_BACK" }, // RenderingServer { "CUBEMAP_BOTTOM", "CUBEMAP_LAYER_BOTTOM" }, // RenderingServer { "CUBEMAP_FRONT", "CUBEMAP_LAYER_FRONT" }, // RenderingServer @@ -242,11 +243,11 @@ static const char *gdscript_function_renames[][2] = { { "commit_handle", "_commit_handle" }, // EditorNode3DGizmo { "convex_hull_2d", "convex_hull" }, // Geometry2D { "create_gizmo", "_create_gizmo" }, // EditorNode3DGizmoPlugin - { "cursor_get_blink_speed", "get_caret_blink_speed" }, // TextEdit + { "cursor_get_blink_speed", "get_caret_blink_interval" }, // TextEdit { "cursor_get_column", "get_caret_column" }, // TextEdit { "cursor_get_line", "get_caret_line" }, // TextEdit { "cursor_set_blink_enabled", "set_caret_blink_enabled" }, // TextEdit - { "cursor_set_blink_speed", "set_caret_blink_speed" }, // TextEdit + { "cursor_set_blink_speed", "set_caret_blink_interval" }, // TextEdit { "cursor_set_column", "set_caret_column" }, // TextEdit { "cursor_set_line", "set_caret_line" }, // TextEdit { "damped_spring_joint_create", "joint_make_damped_spring" }, // PhysicsServer2D @@ -295,7 +296,7 @@ static const char *gdscript_function_renames[][2] = { { "get_d", "get_distance" }, // LineShape2D { "get_drag_data", "_get_drag_data" }, // Control { "get_drag_data_fw", "_get_drag_data_fw" }, // ScriptEditor - { "get_editor_viewport", "get_viewport" }, // EditorPlugin + { "get_editor_viewport", "get_editor_main_screen" }, // EditorPlugin { "get_enabled_focus_mode", "get_focus_mode" }, // BaseButton { "get_endian_swap", "is_big_endian" }, // File { "get_error_string", "get_error_message" }, // JSON @@ -671,11 +672,11 @@ static const char *csharp_function_renames[][2] = { { "ClipPolylineWithPolygon2d", "ClipPolylineWithPolygon" }, //Geometry2D { "CommitHandle", "_CommitHandle" }, // EditorNode3DGizmo { "ConvexHull2d", "ConvexHull" }, // Geometry2D - { "CursorGetBlinkSpeed", "GetCaretBlinkSpeed" }, // TextEdit + { "CursorGetBlinkSpeed", "GetCaretBlinkInterval" }, // TextEdit { "CursorGetColumn", "GetCaretColumn" }, // TextEdit { "CursorGetLine", "GetCaretLine" }, // TextEdit { "CursorSetBlinkEnabled", "SetCaretBlinkEnabled" }, // TextEdit - { "CursorSetBlinkSpeed", "SetCaretBlinkSpeed" }, // TextEdit + { "CursorSetBlinkSpeed", "SetCaretBlinkInterval" }, // TextEdit { "CursorSetColumn", "SetCaretColumn" }, // TextEdit { "CursorSetLine", "SetCaretLine" }, // TextEdit { "DampedSpringJointCreate", "JointMakeDampedSpring" }, // PhysicsServer2D @@ -1031,9 +1032,12 @@ static const char *gdscript_properties_renames[][2] = { // { "filename", "scene_file_path" }, // Node { "as_normalmap", "as_normal_map" }, // NoiseTexture { "bbcode_text", "text" }, // RichTextLabel + { "bg", "panel" }, // Theme + { "bg_focus", "focus" }, // Theme + { "caret_blink_speed", "caret_blink_interval" }, // TextEdit, LineEdit { "caret_moving_by_right_click", "caret_move_on_right_click" }, // TextEdit { "caret_position", "caret_column" }, // LineEdit - { "check_vadjust", "check_v_adjust" }, // Theme + { "check_vadjust", "check_v_offset" }, // Theme { "close_h_ofs", "close_h_offset" }, // Theme { "close_v_ofs", "close_v_offset" }, // Theme { "commentfocus", "comment_focus" }, // Theme @@ -1051,6 +1055,9 @@ static const char *gdscript_properties_renames[][2] = { { "focus_neighbour_left", "focus_neighbor_left" }, // Control { "focus_neighbour_right", "focus_neighbor_right" }, // Control { "focus_neighbour_top", "focus_neighbor_top" }, // Control + { "file_icon_modulate", "file_icon_color" }, // Theme + { "files_disabled", "file_disabled_color" }, // Theme + { "folder_icon_modulate", "folder_icon_color" }, // Theme { "global_rate_scale", "playback_speed_scale" }, // AudioServer { "gravity_distance_scale", "gravity_point_distance_scale" }, // Area2D { "gravity_vec", "gravity_direction" }, // Area2D @@ -1065,7 +1072,11 @@ static const char *gdscript_properties_renames[][2] = { { "mid_height", "height" }, // CapsuleMesh { "offset_h", "drag_horizontal_offset" }, // Camera2D { "offset_v", "drag_vertical_offset" }, // Camera2D + { "off", "unchecked" }, // Theme + { "off_disabled", "unchecked_disabled" }, // Theme { "ofs", "offset" }, // Theme + { "on", "checked" }, // Theme + { "on_disabled", "checked_disabled" }, // Theme { "oneshot", "one_shot" }, // AnimatedTexture { "out_of_range_mode", "max_polyphony" }, // AudioStreamPlayer3D { "pause_mode", "process_mode" }, // Node @@ -1126,6 +1137,7 @@ static const char *csharp_properties_renames[][2] = { // { "Znear", "Near" }, // Camera3D { "AsNormalmap", "AsNormalMap" }, // NoiseTexture { "BbcodeText", "Text" }, // RichTextLabel + { "CaretBlinkSpeed", "CaretBlinkInterval" }, // TextEdit, LineEdit { "CaretMovingByRightClick", "CaretMoveOnRightClick" }, // TextEdit { "CaretPosition", "CaretColumn" }, // LineEdit { "CheckVadjust", "CheckVAdjust" }, // Theme diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index d75f01e60b..2b0d6f740a 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -2606,7 +2606,7 @@ ProjectManager::ProjectManager() { } PanelContainer *pc = memnew(PanelContainer); - pc->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + pc->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); pc->set_v_size_flags(Control::SIZE_EXPAND_FILL); search_tree_vb->add_child(pc); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 581315d512..11cbc4132c 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -521,7 +521,7 @@ void ProjectSettingsEditor::_update_action_map_editor() { void ProjectSettingsEditor::_update_theme() { search_box->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons"))); restart_close_button->set_icon(get_theme_icon(SNAME("Close"), SNAME("EditorIcons"))); - restart_container->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + restart_container->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); restart_icon->set_texture(get_theme_icon(SNAME("StatusWarning"), SNAME("EditorIcons"))); restart_label->add_theme_color_override("font_color", get_theme_color(SNAME("warning_color"), SNAME("Editor"))); diff --git a/editor/scene_create_dialog.cpp b/editor/scene_create_dialog.cpp index 9b8684b7b8..573e57ca04 100644 --- a/editor/scene_create_dialog.cpp +++ b/editor/scene_create_dialog.cpp @@ -53,7 +53,7 @@ void SceneCreateDialog::_notification(int p_what) { node_type_3d->set_icon(get_theme_icon(SNAME("Node3D"), SNAME("EditorIcons"))); node_type_gui->set_icon(get_theme_icon(SNAME("Control"), SNAME("EditorIcons"))); node_type_other->add_theme_icon_override(SNAME("icon"), get_theme_icon(SNAME("Node"), SNAME("EditorIcons"))); - status_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + status_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); } break; } } diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 7d065b4920..16ab441324 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -134,7 +134,7 @@ void ScriptCreateDialog::_notification(int p_what) { path_button->set_icon(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons"))); parent_browse_button->set_icon(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons"))); parent_search_button->set_icon(get_theme_icon(SNAME("ClassList"), SNAME("EditorIcons"))); - status_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + status_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); } break; } } diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp index 522fd7c645..ae533b5b75 100644 --- a/editor/shader_create_dialog.cpp +++ b/editor/shader_create_dialog.cpp @@ -89,7 +89,7 @@ void ShaderCreateDialog::_update_theme() { } path_button->set_icon(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons"))); - status_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); + status_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree"))); } void ShaderCreateDialog::_update_language_info() { |