Skip to content

Commit

Permalink
Merge pull request #11246 from djrm/pr_better_script_temperature
Browse files Browse the repository at this point in the history
More consistent script color temperatures.
  • Loading branch information
hpvb authored Sep 14, 2017
2 parents bdb07fc + 7a362af commit 3f4062c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions editor/editor_themes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("contrast_color_1", "Editor", contrast_color_1);
theme->set_color("contrast_color_2", "Editor", contrast_color_2);

theme->set_color("font_color", "Editor", font_color);

Color success_color = accent_color.linear_interpolate(Color(.6, 1, .6), 0.8);
Color warning_color = accent_color.linear_interpolate(Color(1, 1, .2), 0.8);
Color error_color = accent_color.linear_interpolate(Color(1, .2, .2), 0.8);
Expand Down
6 changes: 2 additions & 4 deletions editor/plugins/script_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1393,8 +1393,8 @@ void ScriptEditor::_update_script_colors() {
bool highlight_current = EditorSettings::get_singleton()->get("text_editor/open_scripts/highlight_current_script");

int hist_size = EditorSettings::get_singleton()->get("text_editor/open_scripts/script_temperature_history_size");
Color hot_color = EditorSettings::get_singleton()->get("text_editor/open_scripts/script_temperature_hot_color");
Color cold_color = EditorSettings::get_singleton()->get("text_editor/open_scripts/script_temperature_cold_color");
Color hot_color = get_color("accent_color", "Editor");
Color cold_color = get_color("font_color", "Editor");

for (int i = 0; i < script_list->get_item_count(); i++) {

Expand Down Expand Up @@ -2520,8 +2520,6 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
EDITOR_DEF("text_editor/open_scripts/script_temperature_enabled", true);
EDITOR_DEF("text_editor/open_scripts/highlight_current_script", true);
EDITOR_DEF("text_editor/open_scripts/script_temperature_history_size", 15);
EDITOR_DEF("text_editor/open_scripts/script_temperature_hot_color", Color::html("ed5e5e"));
EDITOR_DEF("text_editor/open_scripts/script_temperature_cold_color", Color(1, 1, 1, 0.3));
EDITOR_DEF("text_editor/open_scripts/current_script_background_color", Color(1, 1, 1, 0.5));
EDITOR_DEF("text_editor/open_scripts/group_help_pages", true);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/open_scripts/sort_scripts_by", PROPERTY_HINT_ENUM, "Name,Path"));
Expand Down

0 comments on commit 3f4062c

Please sign in to comment.