瀏覽代碼

Merge pull request #33614 from Chaosus/fix_theme_element

Fix "matches" label color in light theme
Rémi Verschelde 5 年之前
父節點
當前提交
a1c396e55c
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      editor/code_editor.cpp
  2. 1 1
      editor/editor_help.cpp

+ 1 - 1
editor/code_editor.cpp

@@ -328,7 +328,7 @@ void FindReplaceBar::_update_matches_label() {
 	} else {
 		matches_label->show();
 
-		matches_label->add_color_override("font_color", results_count > 0 ? Color(1, 1, 1) : EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
+		matches_label->add_color_override("font_color", results_count > 0 ? get_color("font_color", "Label") : get_color("error_color", "Editor"));
 		matches_label->set_text(vformat(results_count == 1 ? TTR("%d match.") : TTR("%d matches."), results_count));
 	}
 }

+ 1 - 1
editor/editor_help.cpp

@@ -1802,7 +1802,7 @@ void FindBar::_update_matches_label() {
 	} else {
 		matches_label->show();
 
-		matches_label->add_color_override("font_color", results_count > 0 ? Color(1, 1, 1) : EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
+		matches_label->add_color_override("font_color", results_count > 0 ? get_color("font_color", "Label") : get_color("error_color", "Editor"));
 		matches_label->set_text(vformat(results_count == 1 ? TTR("%d match.") : TTR("%d matches."), results_count));
 	}
 }