Remove Default
impl for StatusColors
(#3977)
This PR removes the `Default` impl for `StatusColors`. Since we need default light and dark variants for `StatusColors`, we can't use a single `Default` impl. Release Notes: - N/A
This commit is contained in:
parent
d374953180
commit
824d06e2b2
4 changed files with 35 additions and 22 deletions
|
@ -2,7 +2,7 @@ use gpui::Hsla;
|
|||
use refineable::Refineable;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::{PlayerColors, StatusColors, SyntaxTheme, SystemColors};
|
||||
use crate::{PlayerColors, StatusColors, StatusColorsRefinement, SyntaxTheme, SystemColors};
|
||||
|
||||
#[derive(Refineable, Clone, Debug)]
|
||||
#[refineable(Debug, serde::Deserialize)]
|
||||
|
@ -219,6 +219,8 @@ pub struct ThemeStyles {
|
|||
|
||||
#[refineable]
|
||||
pub colors: ThemeColors,
|
||||
|
||||
#[refineable]
|
||||
pub status: StatusColors,
|
||||
pub player: PlayerColors,
|
||||
pub syntax: Arc<SyntaxTheme>,
|
||||
|
|
|
@ -78,15 +78,6 @@ pub struct StatusColors {
|
|||
pub warning_border: Hsla,
|
||||
}
|
||||
|
||||
impl Default for StatusColors {
|
||||
/// Don't use this!
|
||||
/// 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()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct DiagnosticColors {
|
||||
pub error: Hsla,
|
||||
pub warning: Hsla,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue