summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_node.cpp13
-rw-r--r--editor/editor_themes.cpp9
-rw-r--r--scene/resources/default_theme/default_theme.cpp16
3 files changed, 4 insertions, 34 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index bb34a45938..d8bc555d6d 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -3642,17 +3642,12 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p
}
if (ScriptServer::is_global_class(p_class)) {
- String icon_path = EditorNode::get_editor_data().script_class_get_icon_path(p_class);
- Ref<ImageTexture> icon = _load_custom_class_icon(icon_path);
- if (icon.is_valid()) {
- return icon;
- }
-
- Ref<Script> script = ResourceLoader::load(ScriptServer::get_global_class_path(p_class), "Script");
+ Ref<ImageTexture> icon;
+ Ref<Script> script = EditorNode::get_editor_data().script_class_load_script(p_class);
while (script.is_valid()) {
- String current_icon_path;
- script->get_language()->get_global_class_name(script->get_path(), nullptr, &current_icon_path);
+ StringName name = EditorNode::get_editor_data().script_class_get_name(script->get_path());
+ String current_icon_path = EditorNode::get_editor_data().script_class_get_icon_path(name);
icon = _load_custom_class_icon(current_icon_path);
if (icon.is_valid()) {
return icon;
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 5f59e6e70a..a93763810b 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -570,17 +570,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("focus", "PopupMenu", style_menu);
theme->set_stylebox("disabled", "PopupMenu", style_menu);
- theme->set_stylebox("normal", "Button", style_menu);
- theme->set_stylebox("hover", "Button", style_menu);
- theme->set_stylebox("pressed", "Button", style_menu);
- theme->set_stylebox("focus", "Button", style_menu);
- theme->set_stylebox("disabled", "Button", style_menu);
-
theme->set_color("font_color", "MenuButton", font_color);
theme->set_color("font_color_hover", "MenuButton", font_color_hl);
- theme->set_color("font_color", "Button", font_color);
- theme->set_color("font_color_hover", "Button", font_color_hl);
- theme->set_color("font_color_pressed", "Button", accent_color);
theme->set_stylebox("MenuHover", "EditorStyles", style_menu_hover_border);
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index aebb0d7ba4..83d4db7bae 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -219,22 +219,6 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("hseparation", "ColorPickerButton", 2 * scale);
- // Button
-
- theme->set_stylebox("normal", "Button", make_empty_stylebox(6, 4, 6, 4));
- theme->set_stylebox("pressed", "Button", make_stylebox(button_pressed_png, 4, 4, 4, 4, 6, 4, 6, 4));
- theme->set_stylebox("hover", "Button", make_stylebox(button_normal_png, 4, 4, 4, 4, 6, 4, 6, 4));
- theme->set_stylebox("disabled", "Button", make_empty_stylebox(6, 4, 6, 4));
- theme->set_stylebox("focus", "Button", focus);
- theme->set_font("font", "Button", default_font);
-
- theme->set_color("font_color", "Button", control_font_color);
- theme->set_color("font_color_pressed", "Button", control_font_color_pressed);
- theme->set_color("font_color_hover", "Button", control_font_color_hover);
- theme->set_color("font_color_disabled", "Button", Color(0.9, 0.95, 1, 0.3));
-
- theme->set_constant("hseparation", "Button", 3);
-
// OptionButton
Ref<StyleBox> sb_optbutton_normal = sb_expand(make_stylebox(option_button_normal_png, 4, 4, 21, 4, 6, 3, 9, 3), 2, 2, 2, 2);