From 8233bab2c0879d1f4ad6c241e0df6b96925c7853 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 27 Feb 2025 01:41:07 +0100 Subject: [PATCH] Tweak high-end mark in the visual shader editor's node creation dialog - Use Forward+/Mobile terminology as support actually depends on the rendering method used, not the rendering driver. - Use a standard warning color as this is no longer indicated as Vulkan-specific. - Fix color on light theme (the text was being modulated instead of having its color overridden). --- doc/classes/VisualShaderNodeCustom.xml | 4 ++-- editor/plugins/visual_shader_editor_plugin.cpp | 6 +++--- editor/themes/editor_theme_manager.cpp | 6 ------ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index 5db0dfb3277..481a5b0918d 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -184,8 +184,8 @@ - Override this method to enable high-end mark in the Visual Shader Editor's members dialog. - Defining this method is [b]optional[/b]. If not overridden, it's [code]false[/code]. + Override this method to enable the high-end mark in the Visual Shader Editor's members dialog. This should return [code]true[/code] for nodes that only work when using the Forward+ and Mobile rendering methods. + Defining this method is [b]optional[/b]. If not overridden, it's [code]false[/code], which indicates this node works with all rendering methods (including Compatibility). diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index b8af4603e80..0ab69435af5 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -5191,7 +5191,7 @@ void VisualShaderEditor::_notification(int p_what) { } break; case NOTIFICATION_THEME_CHANGED: { - highend_label->set_modulate(get_theme_color(SNAME("highend_color"), EditorStringName(Editor))); + highend_label->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("warning_color"), EditorStringName(Editor))); param_filter->set_right_icon(Control::get_editor_theme_icon(SNAME("Search"))); node_filter->set_right_icon(Control::get_editor_theme_icon(SNAME("Search"))); @@ -6773,9 +6773,9 @@ VisualShaderEditor::VisualShaderEditor() { highend_label = memnew(Label); desc_hbox->add_child(highend_label); highend_label->set_visible(false); - highend_label->set_text("Vulkan"); + highend_label->set_text(TTRC("Forward+/Mobile")); highend_label->set_mouse_filter(Control::MOUSE_FILTER_STOP); - highend_label->set_tooltip_text(TTR("High-end node")); + highend_label->set_tooltip_text(TTR("Only supported in the Forward+ and Mobile rendering methods, not Compatibility.")); node_desc = memnew(RichTextLabel); members_vb->add_child(node_desc); diff --git a/editor/themes/editor_theme_manager.cpp b/editor/themes/editor_theme_manager.cpp index 1793418c2a2..9328fc24797 100644 --- a/editor/themes/editor_theme_manager.cpp +++ b/editor/themes/editor_theme_manager.cpp @@ -544,12 +544,6 @@ void EditorThemeManager::_create_shared_styles(const Ref &p_theme, p_theme->set_color("forward_plus_color", EditorStringName(Editor), Color::hex(0x5d8c3fff)); p_theme->set_color("mobile_color", EditorStringName(Editor), Color::hex(0xa5557dff)); p_theme->set_color("gl_compatibility_color", EditorStringName(Editor), Color::hex(0x5586a4ff)); - - if (p_config.dark_theme) { - p_theme->set_color("highend_color", EditorStringName(Editor), Color(1.0, 0.0, 0.0)); - } else { - p_theme->set_color("highend_color", EditorStringName(Editor), Color::hex(0xad1128ff)); - } } // Constants.