Merge pull request #75923 from dalexeev/editor-rtl-selection-color

Editor Theme: Set `selection_color` property of `RichTextLabel`
This commit is contained in:
Rémi Verschelde 2023-04-11 19:40:59 +02:00
commit 12f2c753fe
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 2 additions and 3 deletions

View File

@ -97,8 +97,6 @@ void EditorLog::_update_theme() {
log->add_theme_font_size_override("italics_font_size", font_size);
log->add_theme_font_size_override("mono_font_size", font_size);
log->add_theme_color_override("selection_color", get_theme_color(SNAME("accent_color"), SNAME("Editor")) * Color(1, 1, 1, 0.4));
type_filter_map[MSG_TYPE_STD]->toggle_button->set_icon(get_theme_icon(SNAME("Popup"), SNAME("EditorIcons")));
type_filter_map[MSG_TYPE_ERROR]->toggle_button->set_icon(get_theme_icon(SNAME("StatusError"), SNAME("EditorIcons")));
type_filter_map[MSG_TYPE_WARNING]->toggle_button->set_icon(get_theme_icon(SNAME("StatusWarning"), SNAME("EditorIcons")));

View File

@ -1597,6 +1597,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("default_color", "RichTextLabel", font_color);
theme->set_color("font_shadow_color", "RichTextLabel", Color(0, 0, 0, 0));
theme->set_color("font_outline_color", "RichTextLabel", font_outline_color);
theme->set_color("selection_color", "RichTextLabel", selection_color);
theme->set_constant("shadow_offset_x", "RichTextLabel", 1 * EDSCALE);
theme->set_constant("shadow_offset_y", "RichTextLabel", 1 * EDSCALE);
theme->set_constant("shadow_outline_size", "RichTextLabel", 1 * EDSCALE);
@ -1618,7 +1619,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("value_color", "EditorHelp", font_color * Color(1, 1, 1, 0.6));
theme->set_color("qualifier_color", "EditorHelp", font_color * Color(1, 1, 1, 0.8));
theme->set_color("type_color", "EditorHelp", accent_color.lerp(font_color, 0.5));
theme->set_color("selection_color", "EditorHelp", accent_color * Color(1, 1, 1, 0.4));
theme->set_color("selection_color", "EditorHelp", selection_color);
theme->set_color("link_color", "EditorHelp", accent_color.lerp(mono_color, 0.8));
theme->set_color("code_color", "EditorHelp", accent_color.lerp(mono_color, 0.6));
theme->set_color("kbd_color", "EditorHelp", accent_color.lerp(property_color, 0.6));