From 7aacb637623a8e8d3c8cab1f56c37d440e8a907e Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 25 Feb 2022 10:48:22 +0100 Subject: [PATCH] Respect field editor background, color and selection styling --- crates/editor/src/editor.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index dcbbe76872..faf91143be 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -5463,9 +5463,14 @@ fn build_style( get_field_editor_theme: Option, cx: &AppContext, ) -> EditorStyle { - let theme = settings.theme.editor.clone(); + let mut theme = settings.theme.editor.clone(); if let Some(get_field_editor_theme) = get_field_editor_theme { let field_editor_theme = get_field_editor_theme(&settings.theme); + if let Some(background) = field_editor_theme.container.background_color { + theme.background = background; + } + theme.text_color = field_editor_theme.text.color; + theme.selection = field_editor_theme.selection; EditorStyle { text: field_editor_theme.text, placeholder_text: field_editor_theme.placeholder_text,