From 3fe01226b74a892270d724dea5c8c6d79a6bc5fa Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 5 Nov 2021 20:50:01 +0100 Subject: [PATCH] Use black for font outlines by default instead of white This makes font outlines more usable out of the box, as black is one of the most commonly used colors for font outlines. --- doc/classes/Button.xml | 2 +- doc/classes/ItemList.xml | 2 +- doc/classes/Label.xml | 2 +- doc/classes/LineEdit.xml | 2 +- doc/classes/LinkButton.xml | 2 +- doc/classes/MenuBar.xml | 2 +- doc/classes/PopupMenu.xml | 4 +-- doc/classes/ProgressBar.xml | 2 +- doc/classes/RichTextLabel.xml | 2 +- doc/classes/TabBar.xml | 2 +- doc/classes/TabContainer.xml | 2 +- doc/classes/TextEdit.xml | 2 +- doc/classes/Tree.xml | 2 +- doc/classes/Window.xml | 2 +- scene/theme/default_theme.cpp | 46 +++++++++++++++++------------------ 15 files changed, 38 insertions(+), 38 deletions(-) diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 7ba328c8b8..e5b47ffb89 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -94,7 +94,7 @@ Text [Color] used when the [Button] is being hovered and pressed. - + The tint of text outline of the [Button]. diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 593f41bc70..70953609c0 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -461,7 +461,7 @@ Text [Color] used when the item is hovered and not selected yet. - + The tint of text outline of the item. diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index edd8a3e436..f39f5616f0 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -115,7 +115,7 @@ Default text [Color] of the [Label]. - + The color of text outline. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 1f25e926c9..77fff22157 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -454,7 +454,7 @@ Default font color. - + The tint of text outline of the [LineEdit]. diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index aa81b6fde0..bcdffcd1ee 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -74,7 +74,7 @@ Text [Color] used when the [LinkButton] is being hovered and pressed. - + The tint of text outline of the [LinkButton]. diff --git a/doc/classes/MenuBar.xml b/doc/classes/MenuBar.xml index 8812017e49..9e4287331c 100644 --- a/doc/classes/MenuBar.xml +++ b/doc/classes/MenuBar.xml @@ -132,7 +132,7 @@ Text [Color] used when the menu item is being hovered and pressed. - + The tint of text outline of the menu item. diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index d884c7806f..266a0940eb 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -680,13 +680,13 @@ [Color] used for the hovered text. - + The tint of text outline of the menu item. [Color] used for labeled separators' text. See [method add_separator]. - + The tint of text outline of the labeled separator. diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index 02f82f6a9a..e562d39bb7 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -40,7 +40,7 @@ The color of the text. - + The tint of text outline of the [ProgressBar]. diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 85dea1485a..de18a9b54d 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -741,7 +741,7 @@ The default text color. - + The default tint of text outline. diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml index c59a336bc2..a2beef81eb 100644 --- a/doc/classes/TabBar.xml +++ b/doc/classes/TabBar.xml @@ -360,7 +360,7 @@ Font color of the currently hovered tab. Does not apply to the selected tab. - + The tint of text outline of the tab name. diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 0c1feae6e0..145afc2a03 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -276,7 +276,7 @@ Font color of the currently hovered tab. - + The tint of text outline of the tab name. diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index bbf86cf84d..b8a838208b 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -1428,7 +1428,7 @@ Sets the font [Color]. - + The tint of text outline of the [TextEdit]. diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 88cda5ae10..0f318efbd1 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -509,7 +509,7 @@ Text [Color] for a [constant TreeItem.CELL_MODE_CHECK] mode cell when it's non-editable (see [method TreeItem.set_editable]). - + The tint of text outline of the item. diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index 7a60c23e58..c86a1e949b 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -902,7 +902,7 @@ The color of the title's text. - + The color of the title's text outline. diff --git a/scene/theme/default_theme.cpp b/scene/theme/default_theme.cpp index 634b32c9f6..ba0f29cd16 100644 --- a/scene/theme/default_theme.cpp +++ b/scene/theme/default_theme.cpp @@ -174,7 +174,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_focus_color", "Button", control_font_focus_color); theme->set_color("font_hover_pressed_color", "Button", control_font_pressed_color); theme->set_color("font_disabled_color", "Button", control_font_disabled_color); - theme->set_color("font_outline_color", "Button", Color(1, 1, 1)); + theme->set_color("font_outline_color", "Button", Color(0, 0, 0)); theme->set_color("icon_normal_color", "Button", Color(1, 1, 1, 1)); theme->set_color("icon_pressed_color", "Button", Color(1, 1, 1, 1)); @@ -202,7 +202,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_focus_color", "MenuBar", control_font_focus_color); theme->set_color("font_hover_pressed_color", "MenuBar", control_font_pressed_color); theme->set_color("font_disabled_color", "MenuBar", control_font_disabled_color); - theme->set_color("font_outline_color", "MenuBar", Color(1, 1, 1)); + theme->set_color("font_outline_color", "MenuBar", Color(0, 0, 0)); theme->set_constant("h_separation", "MenuBar", Math::round(4 * scale)); @@ -217,7 +217,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_pressed_color", "LinkButton", control_font_pressed_color); theme->set_color("font_hover_color", "LinkButton", control_font_hover_color); theme->set_color("font_focus_color", "LinkButton", control_font_focus_color); - theme->set_color("font_outline_color", "LinkButton", Color(1, 1, 1)); + theme->set_color("font_outline_color", "LinkButton", Color(0, 0, 0)); theme->set_constant("outline_size", "LinkButton", 0); theme->set_constant("underline_spacing", "LinkButton", Math::round(2 * scale)); @@ -256,7 +256,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_hover_pressed_color", "OptionButton", control_font_pressed_color); theme->set_color("font_focus_color", "OptionButton", control_font_focus_color); theme->set_color("font_disabled_color", "OptionButton", control_font_disabled_color); - theme->set_color("font_outline_color", "OptionButton", Color(1, 1, 1)); + theme->set_color("font_outline_color", "OptionButton", Color(0, 0, 0)); theme->set_constant("h_separation", "OptionButton", Math::round(4 * scale)); theme->set_constant("arrow_margin", "OptionButton", Math::round(4 * scale)); @@ -279,7 +279,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_hover_color", "MenuButton", control_font_hover_color); theme->set_color("font_focus_color", "MenuButton", control_font_focus_color); theme->set_color("font_disabled_color", "MenuButton", Color(1, 1, 1, 0.3)); - theme->set_color("font_outline_color", "MenuButton", Color(1, 1, 1)); + theme->set_color("font_outline_color", "MenuButton", Color(0, 0, 0)); theme->set_constant("h_separation", "MenuButton", Math::round(4 * scale)); theme->set_constant("outline_size", "MenuButton", 0); @@ -316,7 +316,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_hover_pressed_color", "CheckBox", control_font_pressed_color); theme->set_color("font_focus_color", "CheckBox", control_font_focus_color); theme->set_color("font_disabled_color", "CheckBox", control_font_disabled_color); - theme->set_color("font_outline_color", "CheckBox", Color(1, 1, 1)); + theme->set_color("font_outline_color", "CheckBox", Color(0, 0, 0)); theme->set_constant("h_separation", "CheckBox", Math::round(4 * scale)); theme->set_constant("check_v_offset", "CheckBox", 0); @@ -353,7 +353,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_hover_pressed_color", "CheckButton", control_font_pressed_color); theme->set_color("font_focus_color", "CheckButton", control_font_focus_color); theme->set_color("font_disabled_color", "CheckButton", control_font_disabled_color); - theme->set_color("font_outline_color", "CheckButton", Color(1, 1, 1)); + theme->set_color("font_outline_color", "CheckButton", Color(0, 0, 0)); theme->set_constant("h_separation", "CheckButton", Math::round(4 * scale)); theme->set_constant("check_v_offset", "CheckButton", 0); @@ -389,7 +389,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_color", "Label", Color(1, 1, 1)); theme->set_color("font_shadow_color", "Label", Color(0, 0, 0, 0)); - theme->set_color("font_outline_color", "Label", Color(1, 1, 1)); + theme->set_color("font_outline_color", "Label", Color(0, 0, 0)); theme->set_constant("shadow_offset_x", "Label", Math::round(1 * scale)); theme->set_constant("shadow_offset_y", "Label", Math::round(1 * scale)); @@ -429,7 +429,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_selected_color", "LineEdit", control_font_pressed_color); theme->set_color("font_uneditable_color", "LineEdit", control_font_disabled_color); theme->set_color("font_placeholder_color", "LineEdit", control_font_placeholder_color); - theme->set_color("font_outline_color", "LineEdit", Color(1, 1, 1)); + theme->set_color("font_outline_color", "LineEdit", Color(0, 0, 0)); theme->set_color("caret_color", "LineEdit", control_font_hover_color); theme->set_color("selection_color", "LineEdit", control_selection_color); theme->set_color("clear_button_color", "LineEdit", control_font_color); @@ -450,7 +450,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_font_size("font_size", "ProgressBar", -1); theme->set_color("font_color", "ProgressBar", control_font_hover_color); - theme->set_color("font_outline_color", "ProgressBar", Color(1, 1, 1)); + theme->set_color("font_outline_color", "ProgressBar", Color(0, 0, 0)); theme->set_constant("outline_size", "ProgressBar", 0); @@ -471,7 +471,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_selected_color", "TextEdit", Color(0, 0, 0, 0)); theme->set_color("font_readonly_color", "TextEdit", control_font_disabled_color); theme->set_color("font_placeholder_color", "TextEdit", control_font_placeholder_color); - theme->set_color("font_outline_color", "TextEdit", Color(1, 1, 1)); + theme->set_color("font_outline_color", "TextEdit", Color(0, 0, 0)); theme->set_color("selection_color", "TextEdit", control_selection_color); theme->set_color("current_line_color", "TextEdit", Color(0.25, 0.25, 0.26, 0.8)); theme->set_color("caret_color", "TextEdit", control_font_color); @@ -515,7 +515,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_selected_color", "CodeEdit", Color(0, 0, 0, 0)); theme->set_color("font_readonly_color", "CodeEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f)); theme->set_color("font_placeholder_color", "CodeEdit", control_font_placeholder_color); - theme->set_color("font_outline_color", "CodeEdit", Color(1, 1, 1)); + theme->set_color("font_outline_color", "CodeEdit", Color(0, 0, 0)); theme->set_color("selection_color", "CodeEdit", control_selection_color); theme->set_color("bookmark_color", "CodeEdit", Color(0.5, 0.64, 1, 0.8)); theme->set_color("breakpoint_color", "CodeEdit", Color(0.9, 0.29, 0.3)); @@ -626,7 +626,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_font("title_font", "Window", Ref()); theme->set_font_size("title_font_size", "Window", -1); theme->set_color("title_color", "Window", control_font_color); - theme->set_color("title_outline_modulate", "Window", Color(1, 1, 1)); + theme->set_color("title_outline_modulate", "Window", Color(0, 0, 0)); theme->set_constant("title_outline_size", "Window", 0); theme->set_constant("title_height", "Window", 36 * scale); theme->set_constant("resize_margin", "Window", Math::round(4 * scale)); @@ -706,8 +706,8 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_disabled_color", "PopupMenu", Color(0.4, 0.4, 0.4, 0.8)); theme->set_color("font_hover_color", "PopupMenu", control_font_color); theme->set_color("font_separator_color", "PopupMenu", control_font_color); - theme->set_color("font_outline_color", "PopupMenu", Color(1, 1, 1)); - theme->set_color("font_separator_outline_color", "PopupMenu", Color(1, 1, 1)); + theme->set_color("font_outline_color", "PopupMenu", Color(0, 0, 0)); + theme->set_color("font_separator_outline_color", "PopupMenu", Color(0, 0, 0)); theme->set_constant("indent", "PopupMenu", Math::round(10 * scale)); theme->set_constant("h_separation", "PopupMenu", Math::round(4 * scale)); @@ -750,7 +750,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_font_size("font_size", "GraphNodeTitleLabel", -1); theme->set_color("font_color", "GraphNodeTitleLabel", control_font_color); theme->set_color("font_shadow_color", "GraphNodeTitleLabel", Color(0, 0, 0, 0)); - theme->set_color("font_outline_color", "GraphNodeTitleLabel", control_font_color); + theme->set_color("font_outline_color", "GraphNodeTitleLabel", Color(0, 0, 0)); theme->set_constant("shadow_offset_x", "GraphNodeTitleLabel", Math::round(1 * scale)); theme->set_constant("shadow_offset_y", "GraphNodeTitleLabel", Math::round(1 * scale)); theme->set_constant("outline_size", "GraphNodeTitleLabel", 0); @@ -794,7 +794,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_color", "Tree", control_font_low_color); theme->set_color("font_selected_color", "Tree", control_font_pressed_color); theme->set_color("font_disabled_color", "Tree", control_font_disabled_color); - theme->set_color("font_outline_color", "Tree", Color(1, 1, 1)); + theme->set_color("font_outline_color", "Tree", Color(0, 0, 0)); theme->set_color("guide_color", "Tree", Color(0.7, 0.7, 0.7, 0.25)); theme->set_color("drop_position_color", "Tree", Color(1, 1, 1)); theme->set_color("relationship_line_color", "Tree", Color(0.27, 0.27, 0.27)); @@ -842,7 +842,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_color", "ItemList", control_font_lower_color); theme->set_color("font_hovered_color", "ItemList", control_font_hover_color); theme->set_color("font_selected_color", "ItemList", control_font_pressed_color); - theme->set_color("font_outline_color", "ItemList", Color(1, 1, 1)); + theme->set_color("font_outline_color", "ItemList", Color(0, 0, 0)); theme->set_color("guide_color", "ItemList", Color(0.7, 0.7, 0.7, 0.25)); theme->set_stylebox("hovered", "ItemList", make_flat_stylebox(Color(1, 1, 1, 0.07))); theme->set_stylebox("selected", "ItemList", make_flat_stylebox(style_selected_color)); @@ -891,7 +891,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_hovered_color", "TabContainer", control_font_hover_color); theme->set_color("font_unselected_color", "TabContainer", control_font_low_color); theme->set_color("font_disabled_color", "TabContainer", control_font_disabled_color); - theme->set_color("font_outline_color", "TabContainer", Color(1, 1, 1)); + theme->set_color("font_outline_color", "TabContainer", Color(0, 0, 0)); theme->set_color("drop_mark_color", "TabContainer", Color(1, 1, 1)); theme->set_constant("side_margin", "TabContainer", Math::round(8 * scale)); @@ -923,7 +923,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_hovered_color", "TabBar", control_font_hover_color); theme->set_color("font_unselected_color", "TabBar", control_font_low_color); theme->set_color("font_disabled_color", "TabBar", control_font_disabled_color); - theme->set_color("font_outline_color", "TabBar", Color(1, 1, 1)); + theme->set_color("font_outline_color", "TabBar", Color(0, 0, 0)); theme->set_color("drop_mark_color", "TabBar", Color(1, 1, 1)); theme->set_constant("h_separation", "TabBar", Math::round(4 * scale)); @@ -1035,7 +1035,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_hover_color", "ColorPickerButton", Color(1, 1, 1, 1)); theme->set_color("font_focus_color", "ColorPickerButton", Color(1, 1, 1, 1)); theme->set_color("font_disabled_color", "ColorPickerButton", Color(0.9, 0.9, 0.9, 0.3)); - theme->set_color("font_outline_color", "ColorPickerButton", Color(1, 1, 1)); + theme->set_color("font_outline_color", "ColorPickerButton", Color(0, 0, 0)); theme->set_constant("h_separation", "ColorPickerButton", Math::round(4 * scale)); theme->set_constant("outline_size", "ColorPickerButton", 0); @@ -1063,7 +1063,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_color", "TooltipLabel", control_font_color); theme->set_color("font_shadow_color", "TooltipLabel", Color(0, 0, 0, 0)); - theme->set_color("font_outline_color", "TooltipLabel", Color(0, 0, 0, 0)); + theme->set_color("font_outline_color", "TooltipLabel", Color(0, 0, 0)); theme->set_constant("shadow_offset_x", "TooltipLabel", 1); theme->set_constant("shadow_offset_y", "TooltipLabel", 1); @@ -1091,7 +1091,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("font_shadow_color", "RichTextLabel", Color(0, 0, 0, 0)); - theme->set_color("font_outline_color", "RichTextLabel", Color(1, 1, 1)); + theme->set_color("font_outline_color", "RichTextLabel", Color(0, 0, 0)); theme->set_constant("shadow_offset_x", "RichTextLabel", Math::round(1 * scale)); theme->set_constant("shadow_offset_y", "RichTextLabel", Math::round(1 * scale));