migrate ui crate to new theme tokens
This commit is contained in:
@@ -4,7 +4,7 @@ use gpui::{
|
||||
RenderOnce, Stateful, StatefulInteractiveElement as _, Styled, Window, WindowControlArea, div,
|
||||
px,
|
||||
};
|
||||
use theme::ActiveTheme;
|
||||
use theme::{ActiveTheme, plate_active};
|
||||
|
||||
use crate::{Icon, IconName, Sizable as _, h_flex};
|
||||
|
||||
@@ -70,7 +70,7 @@ impl ControlIcon {
|
||||
#[inline]
|
||||
fn hover_fg(&self, cx: &App) -> Hsla {
|
||||
if self.is_close() {
|
||||
cx.theme().danger_foreground
|
||||
cx.theme().on_accent
|
||||
} else {
|
||||
cx.theme().text
|
||||
}
|
||||
@@ -79,18 +79,18 @@ impl ControlIcon {
|
||||
#[inline]
|
||||
fn hover_bg(&self, cx: &App) -> Hsla {
|
||||
if self.is_close() {
|
||||
cx.theme().danger_background
|
||||
cx.theme().danger_strong
|
||||
} else {
|
||||
cx.theme().ghost_element_hover
|
||||
cx.theme().element_hover
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn active_bg(&self, cx: &mut App) -> Hsla {
|
||||
if self.is_close() {
|
||||
cx.theme().danger_active
|
||||
plate_active(cx.theme().danger_strong)
|
||||
} else {
|
||||
cx.theme().ghost_element_active
|
||||
cx.theme().element_active
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user