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:
Marshall Bowers
2024-01-09 11:31:19 -05:00
committed by GitHub
parent d374953180
commit 824d06e2b2
4 changed files with 35 additions and 22 deletions
+3 -1
View File
@@ -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>,
-9
View File
@@ -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,