Use regular text color for diagnostic popovers (#3918)

This PR updates the diagnostic popovers to use the regular editor text
color rather than one specific to the diagnostic kind.

Release Notes:

- Updated text color in diagnostic popovers.
This commit is contained in:
Marshall Bowers 2024-01-05 14:13:43 -05:00 committed by GitHub
parent c7c874a371
commit 79cccdb6d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -515,34 +515,28 @@ impl DiagnosticPopover {
};
struct DiagnosticColors {
pub text: Hsla,
pub background: Hsla,
pub border: Hsla,
}
let diagnostic_colors = match self.local_diagnostic.diagnostic.severity {
DiagnosticSeverity::ERROR => DiagnosticColors {
text: style.status.error,
background: style.status.error_background,
border: style.status.error_border,
},
DiagnosticSeverity::WARNING => DiagnosticColors {
text: style.status.warning,
background: style.status.warning_background,
border: style.status.warning_border,
},
DiagnosticSeverity::INFORMATION => DiagnosticColors {
text: style.status.info,
background: style.status.info_background,
border: style.status.info_border,
},
DiagnosticSeverity::HINT => DiagnosticColors {
text: style.status.hint,
background: style.status.hint_background,
border: style.status.hint_border,
},
_ => DiagnosticColors {
text: style.status.ignored,
background: style.status.ignored_background,
border: style.status.ignored_border,
},
@ -554,7 +548,7 @@ impl DiagnosticPopover {
.px_2()
.py_1()
.bg(diagnostic_colors.background)
.text_color(diagnostic_colors.text)
.text_color(style.text.color)
.border_1()
.border_color(diagnostic_colors.border)
.rounded_md()