summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2023-03-08 19:12:43 +0800
committerYuri Sizov <yuris@humnom.net>2023-03-14 13:59:03 +0100
commitb4a1bfd6d5d9587c2771e9882e02569cd91d3dcb (patch)
treeab718515cc264c1ad662b1fa28c7d6217904a03a /editor
parent4ff705b37eca3b8de2acf5919caf2324cba9c49d (diff)
Fix coloring of the renderer options button
(cherry picked from commit ac7a4f6e879715f1fece59facffbed3f78ab9b94)
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 8040ba5f1c..0b438d8896 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -6494,13 +6494,15 @@ void EditorNode::_bottom_panel_raise_toggled(bool p_pressed) {
}
void EditorNode::_update_renderer_color() {
- if (renderer->get_text() == "Forward+") {
+ String rendering_method = renderer->get_selected_metadata();
+
+ if (rendering_method == "forward_plus") {
renderer->add_theme_color_override("font_color", Color::hex(0x5d8c3fff));
}
- if (renderer->get_text() == "Mobile") {
+ if (rendering_method == "mobile") {
renderer->add_theme_color_override("font_color", Color::hex(0xa5557dff));
}
- if (renderer->get_text() == "Compatibility") {
+ if (rendering_method == "gl_compatibility") {
renderer->add_theme_color_override("font_color", Color::hex(0x5586a4ff));
}
}