Style empty project diagnostics state
This commit is contained in:
parent
adf00fafdf
commit
4d9cdd474b
2 changed files with 47 additions and 43 deletions
|
@ -103,7 +103,7 @@ impl View for ProjectDiagnosticsEditor {
|
||||||
if self.path_states.is_empty() {
|
if self.path_states.is_empty() {
|
||||||
let theme = &self.settings.borrow().theme.project_diagnostics;
|
let theme = &self.settings.borrow().theme.project_diagnostics;
|
||||||
Label::new(
|
Label::new(
|
||||||
"No problems detected in the project".to_string(),
|
"No problems in workspace".to_string(),
|
||||||
theme.empty_message.clone(),
|
theme.empty_message.clone(),
|
||||||
)
|
)
|
||||||
.aligned()
|
.aligned()
|
||||||
|
@ -770,6 +770,9 @@ pub(crate) fn render_summary(
|
||||||
text_style: &TextStyle,
|
text_style: &TextStyle,
|
||||||
theme: &theme::ProjectDiagnostics,
|
theme: &theme::ProjectDiagnostics,
|
||||||
) -> ElementBox {
|
) -> ElementBox {
|
||||||
|
if summary.error_count == 0 && summary.warning_count == 0 {
|
||||||
|
Label::new("No problems".to_string(), text_style.clone()).boxed()
|
||||||
|
} else {
|
||||||
let icon_width = theme.tab_icon_width;
|
let icon_width = theme.tab_icon_width;
|
||||||
let icon_spacing = theme.tab_icon_spacing;
|
let icon_spacing = theme.tab_icon_spacing;
|
||||||
let summary_spacing = theme.tab_summary_spacing;
|
let summary_spacing = theme.tab_summary_spacing;
|
||||||
|
@ -813,6 +816,7 @@ pub(crate) fn render_summary(
|
||||||
])
|
])
|
||||||
.boxed()
|
.boxed()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn compare_diagnostics<L: language::ToOffset, R: language::ToOffset>(
|
fn compare_diagnostics<L: language::ToOffset, R: language::ToOffset>(
|
||||||
lhs: &DiagnosticEntry<L>,
|
lhs: &DiagnosticEntry<L>,
|
||||||
|
|
|
@ -313,7 +313,7 @@ message.highlight_text.color = "$text.3.color"
|
||||||
|
|
||||||
[project_diagnostics]
|
[project_diagnostics]
|
||||||
background = "$surface.1"
|
background = "$surface.1"
|
||||||
empty_message = "$text.0"
|
empty_message = { extends = "$text.0", size = 18 }
|
||||||
status_bar_item = { extends = "$text.2", margin.right = 10 }
|
status_bar_item = { extends = "$text.2", margin.right = 10 }
|
||||||
tab_icon_width = 13
|
tab_icon_width = 13
|
||||||
tab_icon_spacing = 4
|
tab_icon_spacing = 4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue