Add additional status colors and style diagnostic popovers (#3846)
This PR adds additional background and border colors for each of the status colors to the theme. These colors are then used to style the diagnostic popovers: <img width="407" alt="Screenshot 2024-01-02 at 4 25 50 PM" src="https://github.com/zed-industries/zed/assets/1486634/fbc64ea7-3dcd-43b7-8520-91f16304bfba"> <img width="396" alt="Screenshot 2024-01-02 at 4 26 05 PM" src="https://github.com/zed-industries/zed/assets/1486634/6e4a44bf-4aac-4595-afff-7fbf8b2b9e1f"> Release Notes: - N/A
This commit is contained in:
parent
2b9570e3e7
commit
93a818d018
17 changed files with 1320 additions and 52 deletions
|
@ -310,19 +310,47 @@ impl<'a> Debug for StatusColorsRefinementPrinter<'a> {
|
|||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let status_colors = vec![
|
||||
("conflict", self.0.conflict),
|
||||
("conflict_background", self.0.conflict_background),
|
||||
("conflict_border", self.0.conflict_border),
|
||||
("created", self.0.created),
|
||||
("created_background", self.0.created_background),
|
||||
("created_border", self.0.created_border),
|
||||
("deleted", self.0.deleted),
|
||||
("deleted_background", self.0.deleted_background),
|
||||
("deleted_border", self.0.deleted_border),
|
||||
("error", self.0.error),
|
||||
("error_background", self.0.error_background),
|
||||
("error_border", self.0.error_border),
|
||||
("hidden", self.0.hidden),
|
||||
("hidden_background", self.0.hidden_background),
|
||||
("hidden_border", self.0.hidden_border),
|
||||
("hint", self.0.hint),
|
||||
("hint_background", self.0.hint_background),
|
||||
("hint_border", self.0.hint_border),
|
||||
("ignored", self.0.ignored),
|
||||
("ignored_background", self.0.ignored_background),
|
||||
("ignored_border", self.0.ignored_border),
|
||||
("info", self.0.info),
|
||||
("info_background", self.0.info_background),
|
||||
("info_border", self.0.info_border),
|
||||
("modified", self.0.modified),
|
||||
("modified_background", self.0.modified_background),
|
||||
("modified_border", self.0.modified_border),
|
||||
("predictive", self.0.predictive),
|
||||
("predictive_background", self.0.predictive_background),
|
||||
("predictive_border", self.0.predictive_border),
|
||||
("renamed", self.0.renamed),
|
||||
("renamed_background", self.0.renamed_background),
|
||||
("renamed_border", self.0.renamed_border),
|
||||
("success", self.0.success),
|
||||
("success_background", self.0.success_background),
|
||||
("success_border", self.0.success_border),
|
||||
("unreachable", self.0.unreachable),
|
||||
("unreachable_background", self.0.unreachable_background),
|
||||
("unreachable_border", self.0.unreachable_border),
|
||||
("warning", self.0.warning),
|
||||
("warning_background", self.0.warning_background),
|
||||
("warning_border", self.0.warning_border),
|
||||
];
|
||||
|
||||
f.write_str("StatusColorsRefinement {")?;
|
||||
|
|
|
@ -78,19 +78,47 @@ impl Zed1ThemeConverter {
|
|||
|
||||
Ok(StatusColorsRefinement {
|
||||
created: convert(lowest.positive.default.foreground),
|
||||
created_background: convert(lowest.positive.default.background),
|
||||
created_border: convert(lowest.positive.default.border),
|
||||
modified: convert(lowest.warning.default.foreground),
|
||||
modified_background: convert(lowest.warning.default.background),
|
||||
modified_border: convert(lowest.warning.default.border),
|
||||
deleted: convert(lowest.negative.default.foreground),
|
||||
deleted_background: convert(lowest.negative.default.background),
|
||||
deleted_border: convert(lowest.negative.default.border),
|
||||
success: convert(lowest.positive.default.foreground),
|
||||
success_background: convert(lowest.positive.default.background),
|
||||
success_border: convert(lowest.positive.default.border),
|
||||
warning: convert(lowest.warning.default.foreground),
|
||||
warning_background: convert(lowest.warning.default.background),
|
||||
warning_border: convert(lowest.warning.default.border),
|
||||
error: convert(lowest.negative.default.foreground),
|
||||
error_background: convert(lowest.negative.default.background),
|
||||
error_border: convert(lowest.negative.default.border),
|
||||
hint: convert(lowest.accent.default.foreground),
|
||||
hint_background: convert(lowest.accent.default.background),
|
||||
hint_border: convert(lowest.accent.default.border),
|
||||
predictive: convert(lowest.positive.default.foreground),
|
||||
predictive_background: convert(lowest.positive.default.background),
|
||||
predictive_border: convert(lowest.positive.default.border),
|
||||
conflict: convert(lowest.warning.default.foreground),
|
||||
conflict_background: convert(lowest.warning.default.background),
|
||||
conflict_border: convert(lowest.warning.default.border),
|
||||
hidden: convert(lowest.base.disabled.foreground),
|
||||
hidden_background: convert(lowest.base.disabled.background),
|
||||
hidden_border: convert(lowest.base.disabled.border),
|
||||
ignored: convert(lowest.variant.default.foreground),
|
||||
ignored_background: convert(lowest.variant.default.background),
|
||||
ignored_border: convert(lowest.variant.default.border),
|
||||
info: convert(lowest.accent.default.foreground),
|
||||
info_background: convert(lowest.accent.default.background),
|
||||
info_border: convert(lowest.accent.default.border),
|
||||
renamed: convert(lowest.accent.default.foreground),
|
||||
renamed_background: convert(lowest.accent.default.background),
|
||||
renamed_border: convert(lowest.accent.default.border),
|
||||
unreachable: convert(lowest.variant.default.foreground), // TODO: Should this be transparent?
|
||||
unreachable_background: convert(lowest.variant.default.background),
|
||||
unreachable_border: convert(lowest.variant.default.border),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue