Reorganize theme2 crate

This commit is contained in:
Nate Butler
2023-11-13 13:58:23 -05:00
parent 7be12cb7b1
commit 889d20d046
9 changed files with 315 additions and 304 deletions
+51 -2
View File
@@ -1,10 +1,59 @@
use gpui::Hsla;
use refineable::Refineable;
use crate::{blue, grass, neutral, red, yellow, StatusColors};
use crate::{blue, grass, neutral, red, yellow};
#[derive(Refineable, Clone, Debug)]
#[refineable(Debug, serde::Deserialize)]
pub struct StatusColors {
/// Indicates some kind of conflict, like a file changed on disk while it was open, or
/// merge conflicts in a Git repository.
pub conflict: Hsla,
/// Indicates something new, like a new file added to a Git repository.
pub created: Hsla,
/// Indicates that something no longer exists, like a deleted file.
pub deleted: Hsla,
/// Indicates a system error, a failed operation or a diagnostic error.
pub error: Hsla,
/// Represents a hidden status, such as a file being hidden in a file tree.
pub hidden: Hsla,
/// Indicates a hint or some kind of additional information.
pub hint: Hsla,
/// Indicates that something is deliberately ignored, such as a file or operation ignored by Git.
pub ignored: Hsla,
/// Represents informational status updates or messages.
pub info: Hsla,
/// Indicates a changed or altered status, like a file that has been edited.
pub modified: Hsla,
/// Indicates something that is predicted, like automatic code completion, or generated code.
pub predictive: Hsla,
/// Represents a renamed status, such as a file that has been renamed.
pub renamed: Hsla,
/// Indicates a successful operation or task completion.
pub success: Hsla,
/// Indicates some kind of unreachable status, like a block of code that can never be reached.
pub unreachable: Hsla,
/// Represents a warning status, like an operation that is about to fail.
pub warning: Hsla,
}
impl Default for StatusColors {
/// Don't use this!
/// We have to have a default for StatusColors to be `[refineable::Refinable]`.
/// We have to have a default to be `[refineable::Refinable]`.
/// todo!("Find a way to not need this for Refinable")
fn default() -> Self {
Self::dark()
}