Checkpoint Broken
This commit is contained in:
@@ -1,4 +1,29 @@
|
||||
use crate::StatusColors;
|
||||
use gpui::Hsla;
|
||||
|
||||
use crate::{blue, grass, neutral, red, yellow, StatusColors};
|
||||
|
||||
impl Default for StatusColors {
|
||||
/// Don't use this!
|
||||
/// We have to have a default for StatusColors to be `[refineable::Refinable]`.
|
||||
fn default() -> Self {
|
||||
Self::dark()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct DiagnosticColors {
|
||||
pub error: Hsla,
|
||||
pub warning: Hsla,
|
||||
pub info: Hsla,
|
||||
}
|
||||
|
||||
pub struct GitStatusColors {
|
||||
pub created: Hsla,
|
||||
pub deleted: Hsla,
|
||||
pub modified: Hsla,
|
||||
pub renamed: Hsla,
|
||||
pub conflict: Hsla,
|
||||
pub ignored: Hsla,
|
||||
}
|
||||
|
||||
impl StatusColors {
|
||||
pub fn dark() -> Self {
|
||||
@@ -38,4 +63,23 @@ impl StatusColors {
|
||||
warning: yellow().light().step_9(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn diagnostic(&self) -> DiagnosticColors {
|
||||
DiagnosticColors {
|
||||
error: self.error,
|
||||
warning: self.warning,
|
||||
info: self.info,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn git(&self) -> GitStatusColors {
|
||||
GitStatusColors {
|
||||
created: self.created,
|
||||
deleted: self.deleted,
|
||||
modified: self.modified,
|
||||
renamed: self.renamed,
|
||||
conflict: self.conflict,
|
||||
ignored: self.ignored,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user