From e7e2ef07676822d848b8916121033fae559b68b2 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 7 May 2021 18:14:52 +0200 Subject: [PATCH] Allow negative contrast values in the editor theme settings When using a negative contrast value, the base color will be lightened to create the derivative colors instead of being darkened. This can lead to better-looking themes, especially for light themes. --- editor/editor_settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 889546f2fa1..dc6d71cd0f1 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -376,7 +376,7 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { _initial_set("interface/theme/accent_color", Color(0.41, 0.61, 0.91)); hints["interface/theme/accent_color"] = PropertyInfo(Variant::COLOR, "interface/theme/accent_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT); _initial_set("interface/theme/contrast", 0.25); - hints["interface/theme/contrast"] = PropertyInfo(Variant::REAL, "interface/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01"); + hints["interface/theme/contrast"] = PropertyInfo(Variant::REAL, "interface/theme/contrast", PROPERTY_HINT_RANGE, "-1, 1, 0.01"); _initial_set("interface/theme/relationship_line_opacity", 0.1); hints["interface/theme/relationship_line_opacity"] = PropertyInfo(Variant::REAL, "interface/theme/relationship_line_opacity", PROPERTY_HINT_RANGE, "0.00, 1, 0.01"); _initial_set("interface/theme/highlight_tabs", false);