status.rs

 1#![allow(missing_docs)]
 2
 3use gpui::Hsla;
 4use refineable::Refineable;
 5
 6use crate::default::default_dark_theme;
 7
 8#[derive(Refineable, Clone, Debug, PartialEq)]
 9#[refineable(Debug, serde::Deserialize)]
10pub struct StatusColors {
11    /// Indicates some kind of conflict, like a file changed on disk while it was open, or
12    /// merge conflicts in a Git repository.
13    pub conflict: Hsla,
14    pub conflict_background: Hsla,
15    pub conflict_border: Hsla,
16
17    /// Indicates something new, like a new file added to a Git repository.
18    pub created: Hsla,
19    pub created_background: Hsla,
20    pub created_border: Hsla,
21
22    /// Indicates that something no longer exists, like a deleted file.
23    pub deleted: Hsla,
24    pub deleted_background: Hsla,
25    pub deleted_border: Hsla,
26
27    /// Indicates a system error, a failed operation or a diagnostic error.
28    pub error: Hsla,
29    pub error_background: Hsla,
30    pub error_border: Hsla,
31
32    /// Represents a hidden status, such as a file being hidden in a file tree.
33    pub hidden: Hsla,
34    pub hidden_background: Hsla,
35    pub hidden_border: Hsla,
36
37    /// Indicates a hint or some kind of additional information.
38    pub hint: Hsla,
39    pub hint_background: Hsla,
40    pub hint_border: Hsla,
41
42    /// Indicates that something is deliberately ignored, such as a file or operation ignored by Git.
43    pub ignored: Hsla,
44    pub ignored_background: Hsla,
45    pub ignored_border: Hsla,
46
47    /// Represents informational status updates or messages.
48    pub info: Hsla,
49    pub info_background: Hsla,
50    pub info_border: Hsla,
51
52    /// Indicates a changed or altered status, like a file that has been edited.
53    pub modified: Hsla,
54    pub modified_background: Hsla,
55    pub modified_border: Hsla,
56
57    /// Indicates something that is predicted, like automatic code completion, or generated code.
58    pub predictive: Hsla,
59    pub predictive_background: Hsla,
60    pub predictive_border: Hsla,
61
62    /// Represents a renamed status, such as a file that has been renamed.
63    pub renamed: Hsla,
64    pub renamed_background: Hsla,
65    pub renamed_border: Hsla,
66
67    /// Indicates a successful operation or task completion.
68    pub success: Hsla,
69    pub success_background: Hsla,
70    pub success_border: Hsla,
71
72    /// Indicates some kind of unreachable status, like a block of code that can never be reached.
73    pub unreachable: Hsla,
74    pub unreachable_background: Hsla,
75    pub unreachable_border: Hsla,
76
77    /// Represents a warning status, like an operation that is about to fail.
78    pub warning: Hsla,
79    pub warning_background: Hsla,
80    pub warning_border: Hsla,
81}
82
83impl Default for StatusColors {
84    fn default() -> Self {
85        default_dark_theme().status().clone()
86    }
87}
88
89pub struct DiagnosticColors {
90    pub error: Hsla,
91    pub warning: Hsla,
92    pub info: Hsla,
93}