Tweak theming of project diagnostics
This commit is contained in:
parent
b5ee095da9
commit
9ccf2f3f58
4 changed files with 17 additions and 5 deletions
|
@ -602,10 +602,14 @@ fn path_header_renderer(buffer: ModelHandle<Buffer>, build_settings: BuildSettin
|
||||||
} else {
|
} else {
|
||||||
"untitled".to_string()
|
"untitled".to_string()
|
||||||
};
|
};
|
||||||
Label::new(file_path, settings.style.text.clone())
|
let mut text_style = settings.style.text.clone();
|
||||||
|
let style = settings.style.diagnostic_path_header;
|
||||||
|
text_style.color = style.text;
|
||||||
|
Label::new(file_path, text_style)
|
||||||
.aligned()
|
.aligned()
|
||||||
.left()
|
.left()
|
||||||
.contained()
|
.contained()
|
||||||
|
.with_style(style.header)
|
||||||
.with_padding_left(cx.line_number_x)
|
.with_padding_left(cx.line_number_x)
|
||||||
.expanded()
|
.expanded()
|
||||||
.boxed()
|
.boxed()
|
||||||
|
|
|
@ -3691,6 +3691,7 @@ impl EditorSettings {
|
||||||
selection: Default::default(),
|
selection: Default::default(),
|
||||||
guest_selections: Default::default(),
|
guest_selections: Default::default(),
|
||||||
syntax: Default::default(),
|
syntax: Default::default(),
|
||||||
|
diagnostic_path_header: Default::default(),
|
||||||
error_diagnostic: Default::default(),
|
error_diagnostic: Default::default(),
|
||||||
invalid_error_diagnostic: Default::default(),
|
invalid_error_diagnostic: Default::default(),
|
||||||
warning_diagnostic: Default::default(),
|
warning_diagnostic: Default::default(),
|
||||||
|
|
|
@ -251,6 +251,7 @@ pub struct EditorStyle {
|
||||||
pub line_number_active: Color,
|
pub line_number_active: Color,
|
||||||
pub guest_selections: Vec<SelectionStyle>,
|
pub guest_selections: Vec<SelectionStyle>,
|
||||||
pub syntax: Arc<SyntaxTheme>,
|
pub syntax: Arc<SyntaxTheme>,
|
||||||
|
pub diagnostic_path_header: DiagnosticStyle,
|
||||||
pub error_diagnostic: DiagnosticStyle,
|
pub error_diagnostic: DiagnosticStyle,
|
||||||
pub invalid_error_diagnostic: DiagnosticStyle,
|
pub invalid_error_diagnostic: DiagnosticStyle,
|
||||||
pub warning_diagnostic: DiagnosticStyle,
|
pub warning_diagnostic: DiagnosticStyle,
|
||||||
|
@ -316,6 +317,7 @@ impl InputEditorStyle {
|
||||||
line_number_active: Default::default(),
|
line_number_active: Default::default(),
|
||||||
guest_selections: Default::default(),
|
guest_selections: Default::default(),
|
||||||
syntax: Default::default(),
|
syntax: Default::default(),
|
||||||
|
diagnostic_path_header: Default::default(),
|
||||||
error_diagnostic: Default::default(),
|
error_diagnostic: Default::default(),
|
||||||
invalid_error_diagnostic: Default::default(),
|
invalid_error_diagnostic: Default::default(),
|
||||||
warning_diagnostic: Default::default(),
|
warning_diagnostic: Default::default(),
|
||||||
|
|
|
@ -256,21 +256,26 @@ invalid_warning_diagnostic = { text = "$text.3.color" }
|
||||||
invalid_information_diagnostic = { text = "$text.3.color" }
|
invalid_information_diagnostic = { text = "$text.3.color" }
|
||||||
invalid_hint_diagnostic = { text = "$text.3.color" }
|
invalid_hint_diagnostic = { text = "$text.3.color" }
|
||||||
|
|
||||||
|
[editor.diagnostic_path_header]
|
||||||
|
text = "$text.0.color"
|
||||||
|
header.background = "#ffffff08"
|
||||||
|
header.border = { width = 1, top = true, color = "$border.0" }
|
||||||
|
|
||||||
[editor.error_diagnostic]
|
[editor.error_diagnostic]
|
||||||
text = "$status.bad"
|
text = "$status.bad"
|
||||||
header = { padding = { left = 10 }, background = "#ffffff08" }
|
header.border = { width = 1, top = true, color = "$border.0" }
|
||||||
|
|
||||||
[editor.warning_diagnostic]
|
[editor.warning_diagnostic]
|
||||||
text = "$status.warn"
|
text = "$status.warn"
|
||||||
header = { padding = { left = 10 }, background = "#ffffff08" }
|
header.border = { width = 1, top = true, color = "$border.0" }
|
||||||
|
|
||||||
[editor.information_diagnostic]
|
[editor.information_diagnostic]
|
||||||
text = "$status.info"
|
text = "$status.info"
|
||||||
header = { padding = { left = 10 }, background = "#ffffff08" }
|
border = { width = 1, top = true, color = "$border.0" }
|
||||||
|
|
||||||
[editor.hint_diagnostic]
|
[editor.hint_diagnostic]
|
||||||
text = "$status.info"
|
text = "$status.info"
|
||||||
header = { padding = { left = 10 }, background = "#ffffff08" }
|
border = { width = 1, top = true, color = "$border.0" }
|
||||||
|
|
||||||
[project_diagnostics]
|
[project_diagnostics]
|
||||||
background = "$surface.1"
|
background = "$surface.1"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue