Remove references to old_theme
This commit is contained in:
parent
7bacdefa2e
commit
14d24a9ac6
5 changed files with 22 additions and 32 deletions
|
@ -2,7 +2,6 @@ use gpui2::{svg, Hsla};
|
|||
use strum::EnumIter;
|
||||
|
||||
use crate::prelude::*;
|
||||
use crate::theme::old_theme;
|
||||
|
||||
#[derive(Default, PartialEq, Copy, Clone)]
|
||||
pub enum IconSize {
|
||||
|
@ -27,17 +26,17 @@ pub enum IconColor {
|
|||
|
||||
impl IconColor {
|
||||
pub fn color(self, cx: &WindowContext) -> Hsla {
|
||||
let theme = old_theme(cx);
|
||||
let theme = theme(cx);
|
||||
match self {
|
||||
IconColor::Default => theme.lowest.base.default.foreground,
|
||||
IconColor::Muted => theme.lowest.variant.default.foreground,
|
||||
IconColor::Disabled => theme.lowest.base.disabled.foreground,
|
||||
IconColor::Placeholder => theme.lowest.base.disabled.foreground,
|
||||
IconColor::Accent => theme.lowest.accent.default.foreground,
|
||||
IconColor::Error => theme.lowest.negative.default.foreground,
|
||||
IconColor::Warning => theme.lowest.warning.default.foreground,
|
||||
IconColor::Success => theme.lowest.positive.default.foreground,
|
||||
IconColor::Info => theme.lowest.accent.default.foreground,
|
||||
IconColor::Default => gpui2::red(),
|
||||
IconColor::Muted => gpui2::red(),
|
||||
IconColor::Disabled => gpui2::red(),
|
||||
IconColor::Placeholder => gpui2::red(),
|
||||
IconColor::Accent => gpui2::red(),
|
||||
IconColor::Error => gpui2::red(),
|
||||
IconColor::Warning => gpui2::red(),
|
||||
IconColor::Success => gpui2::red(),
|
||||
IconColor::Info => gpui2::red()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@ use gpui2::{relative, Hsla, WindowContext};
|
|||
use smallvec::SmallVec;
|
||||
|
||||
use crate::prelude::*;
|
||||
use crate::theme::old_theme;
|
||||
|
||||
#[derive(Default, PartialEq, Copy, Clone)]
|
||||
pub enum LabelColor {
|
||||
#[default]
|
||||
|
@ -21,19 +19,17 @@ pub enum LabelColor {
|
|||
impl LabelColor {
|
||||
pub fn hsla(&self, cx: &WindowContext) -> Hsla {
|
||||
let theme = theme(cx);
|
||||
// TODO: Remove
|
||||
let old_theme = old_theme(cx);
|
||||
|
||||
match self {
|
||||
Self::Default => theme.text,
|
||||
Self::Muted => theme.text_muted,
|
||||
Self::Created => old_theme.middle.positive.default.foreground,
|
||||
Self::Modified => old_theme.middle.warning.default.foreground,
|
||||
Self::Deleted => old_theme.middle.negative.default.foreground,
|
||||
Self::Created => gpui2::red(),
|
||||
Self::Modified => gpui2::red(),
|
||||
Self::Deleted => gpui2::red(),
|
||||
Self::Disabled => theme.text_disabled,
|
||||
Self::Hidden => old_theme.middle.variant.default.foreground,
|
||||
Self::Hidden => gpui2::red(),
|
||||
Self::Placeholder => theme.text_placeholder,
|
||||
Self::Accent => old_theme.middle.accent.default.foreground,
|
||||
Self::Accent => gpui2::red(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue