summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/animation_bezier_editor.cpp4
-rw-r--r--editor/debugger/script_editor_debugger.cpp8
-rw-r--r--editor/editor_command_palette.cpp6
-rw-r--r--editor/editor_file_dialog.cpp2
-rw-r--r--editor/editor_node.cpp4
-rw-r--r--editor/editor_properties.cpp4
-rw-r--r--editor/editor_resource_picker.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp2
-rw-r--r--editor/scene_tree_editor.cpp6
-rw-r--r--editor/shader_create_dialog.cpp12
11 files changed, 26 insertions, 26 deletions
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index fca69f34f3..28642f1bb4 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -491,10 +491,10 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
}
draw_rect(
Rect2(bs_from, bs_to - bs_from),
- get_theme_color("box_selection_fill_color", "Editor"));
+ get_theme_color(SNAME("box_selection_fill_color"), SNAME("Editor")));
draw_rect(
Rect2(bs_from, bs_to - bs_from),
- get_theme_color("box_selection_stroke_color", "Editor"),
+ get_theme_color(SNAME("box_selection_stroke_color"), SNAME("Editor")),
false,
Math::round(EDSCALE));
}
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 989774e943..5fda1c76ef 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -397,15 +397,15 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
s->select(0);
}
}
- emit_signal("stack_dump", stack_dump_info);
+ emit_signal(SNAME("stack_dump"), stack_dump_info);
} else if (p_msg == "stack_frame_vars") {
inspector->clear_stack_variables();
ERR_FAIL_COND(p_data.size() != 1);
- emit_signal("stack_frame_vars", p_data[0]);
+ emit_signal(SNAME("stack_frame_vars"), p_data[0]);
} else if (p_msg == "stack_frame_var") {
inspector->add_stack_variable(p_data);
- emit_signal("stack_frame_var", p_data);
+ emit_signal(SNAME("stack_frame_var"), p_data);
} else if (p_msg == "output") {
ERR_FAIL_COND(p_data.size() != 2);
@@ -434,7 +434,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
} break;
}
EditorNode::get_log()->add_message(output_strings[i], msg_type);
- emit_signal("output", output_strings[i]);
+ emit_signal(SNAME("output"), output_strings[i]);
}
} else if (p_msg == "performance:profile_frame") {
Vector<float> frame_data;
diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp
index 4ad45f9649..e69ced8522 100644
--- a/editor/editor_command_palette.cpp
+++ b/editor/editor_command_palette.cpp
@@ -118,8 +118,8 @@ void EditorCommandPalette::_update_command_search(const String &search_text) {
section->set_text(0, item_name);
section->set_selectable(0, false);
section->set_selectable(1, false);
- section->set_custom_bg_color(0, search_options->get_theme_color("prop_subsection", "Editor"));
- section->set_custom_bg_color(1, search_options->get_theme_color("prop_subsection", "Editor"));
+ section->set_custom_bg_color(0, search_options->get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
+ section->set_custom_bg_color(1, search_options->get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
sections[section_name] = section;
}
@@ -263,7 +263,7 @@ Ref<Shortcut> EditorCommandPalette::add_shortcut_command(const String &p_command
}
void EditorCommandPalette::_theme_changed() {
- command_search_box->set_right_icon(search_options->get_theme_icon("Search", "EditorIcons"));
+ command_search_box->set_right_icon(search_options->get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
}
void EditorCommandPalette::_save_history() const {
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index bf95e6cf62..8956983646 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -86,7 +86,7 @@ void EditorFileDialog::_notification(int p_what) {
if (preview_wheel_index >= 8) {
preview_wheel_index = 0;
}
- Ref<Texture2D> frame = item_list->get_theme_icon("Progress" + itos(preview_wheel_index + 1), "EditorIcons");
+ Ref<Texture2D> frame = item_list->get_theme_icon("Progress" + itos(preview_wheel_index + 1), SNAME("EditorIcons"));
preview->set_texture(frame);
preview_wheel_timeout = 0.1;
}
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index ef8dabc19a..b4850e6ebb 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -576,7 +576,7 @@ void EditorNode::_notification(int p_what) {
// update the icon itself only when the spinner is visible
if (EditorSettings::get_singleton()->get("interface/editor/show_update_spinner")) {
- update_spinner->set_icon(gui_base->get_theme_icon("Progress" + itos(update_spinner_step + 1), "EditorIcons"));
+ update_spinner->set_icon(gui_base->get_theme_icon("Progress" + itos(update_spinner_step + 1), SNAME("EditorIcons")));
}
}
@@ -767,7 +767,7 @@ void EditorNode::_update_update_spinner() {
// On a light theme, icons are dark, so we need to modulate them with an even brighter color.
const bool dark_theme = EditorSettings::get_singleton()->is_dark_theme();
update_spinner->set_self_modulate(
- gui_base->get_theme_color("error_color", "Editor") * (dark_theme ? Color(1.1, 1.1, 1.1) : Color(4.25, 4.25, 4.25)));
+ gui_base->get_theme_color(SNAME("error_color"), SNAME("Editor")) * (dark_theme ? Color(1.1, 1.1, 1.1) : Color(4.25, 4.25, 4.25)));
} else {
update_spinner->set_tooltip(TTR("Spins when the editor window redraws."));
update_spinner->set_self_modulate(Color(1, 1, 1));
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 6c0d11cc6b..c0dadc4484 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2951,8 +2951,8 @@ void EditorPropertyResource::_update_property_bg() {
count_subinspectors = MIN(15, count_subinspectors);
add_theme_color_override("property_color", get_theme_color(SNAME("sub_inspector_property_color"), SNAME("Editor")));
- add_theme_style_override("bg_selected", get_theme_stylebox("sub_inspector_property_bg_selected" + itos(count_subinspectors), "Editor"));
- add_theme_style_override("bg", get_theme_stylebox("sub_inspector_property_bg" + itos(count_subinspectors), "Editor"));
+ add_theme_style_override("bg_selected", get_theme_stylebox("sub_inspector_property_bg_selected" + itos(count_subinspectors), SNAME("Editor")));
+ add_theme_style_override("bg", get_theme_stylebox("sub_inspector_property_bg" + itos(count_subinspectors), SNAME("Editor")));
add_theme_constant_override("font_offset", get_theme_constant(SNAME("sub_inspector_font_offset"), SNAME("Editor")));
add_theme_constant_override("vseparation", 0);
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index c98fbea530..9dbf69a779 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -924,7 +924,7 @@ void EditorShaderPicker::set_create_options(Object *p_menu_node) {
return;
}
- menu_node->add_icon_item(get_theme_icon("Shader", "EditorIcons"), TTR("New Shader"), OBJ_MENU_NEW_SHADER);
+ menu_node->add_icon_item(get_theme_icon(SNAME("Shader"), SNAME("EditorIcons")), TTR("New Shader"), OBJ_MENU_NEW_SHADER);
menu_node->add_separator();
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 04192efecd..1758ba7048 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3968,7 +3968,7 @@ void CanvasItemEditor::edit(CanvasItem *p_canvas_item) {
void CanvasItemEditor::_update_context_menu_stylebox() {
// This must be called when the theme changes to follow the new accent color.
Ref<StyleBoxFlat> context_menu_stylebox = memnew(StyleBoxFlat);
- const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color("accent_color", "Editor");
+ const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("accent_color"), SNAME("Editor"));
context_menu_stylebox->set_bg_color(accent_color * Color(1, 1, 1, 0.1));
// Add an underline to the StyleBox, but prevent its minimum vertical size from changing.
context_menu_stylebox->set_border_color(accent_color);
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 231c5c4f72..e9b715d645 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -6014,7 +6014,7 @@ void fragment() {
void Node3DEditor::_update_context_menu_stylebox() {
// This must be called when the theme changes to follow the new accent color.
Ref<StyleBoxFlat> context_menu_stylebox = memnew(StyleBoxFlat);
- const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color("accent_color", "Editor");
+ const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("accent_color"), SNAME("Editor"));
context_menu_stylebox->set_bg_color(accent_color * Color(1, 1, 1, 0.1));
// Add an underline to the StyleBox, but prevent its minimum vertical size from changing.
context_menu_stylebox->set_border_color(accent_color);
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index d54bf73028..3de87d9df7 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -522,7 +522,7 @@ void SceneTreeEditor::_node_removed(Node *p_node) {
if (p_node == selected) {
selected = nullptr;
- emit_signal("node_selected");
+ emit_signal(SNAME("node_selected"));
}
}
@@ -630,7 +630,7 @@ void SceneTreeEditor::_selected_changed() {
selected = get_node(np);
blocked++;
- emit_signal("node_selected");
+ emit_signal(SNAME("node_selected"));
blocked--;
}
@@ -757,7 +757,7 @@ void SceneTreeEditor::set_selected(Node *p_node, bool p_emit_selected) {
}
if (p_emit_selected) {
- emit_signal("node_selected");
+ emit_signal(SNAME("node_selected"));
}
}
diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp
index 7e6f154fab..6bbefb3bb2 100644
--- a/editor/shader_create_dialog.cpp
+++ b/editor/shader_create_dialog.cpp
@@ -190,7 +190,7 @@ void ShaderCreateDialog::_create_new() {
}
}
- emit_signal("shader_created", shader);
+ emit_signal(SNAME("shader_created"), shader);
hide();
}
@@ -203,7 +203,7 @@ void ShaderCreateDialog::_load_exist() {
return;
}
- emit_signal("shader_created", p_shader);
+ emit_signal(SNAME("shader_created"), p_shader);
hide();
}
@@ -404,18 +404,18 @@ String ShaderCreateDialog::_validate_path(const String &p_path) {
void ShaderCreateDialog::_msg_script_valid(bool valid, const String &p_msg) {
error_label->set_text("- " + p_msg);
if (valid) {
- error_label->add_theme_color_override("font_color", gc->get_theme_color("success_color", "Editor"));
+ error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("success_color"), SNAME("Editor")));
} else {
- error_label->add_theme_color_override("font_color", gc->get_theme_color("error_color", "Editor"));
+ error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("error_color"), SNAME("Editor")));
}
}
void ShaderCreateDialog::_msg_path_valid(bool valid, const String &p_msg) {
path_error_label->set_text("- " + p_msg);
if (valid) {
- path_error_label->add_theme_color_override("font_color", gc->get_theme_color("success_color", "Editor"));
+ path_error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("success_color"), SNAME("Editor")));
} else {
- path_error_label->add_theme_color_override("font_color", gc->get_theme_color("error_color", "Editor"));
+ path_error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("error_color"), SNAME("Editor")));
}
}