diff --git a/crates/story/src/icon_story.rs b/crates/story/src/icon_story.rs index 909229a4..319d73d7 100644 --- a/crates/story/src/icon_story.rs +++ b/crates/story/src/icon_story.rs @@ -5,7 +5,7 @@ use gpui::{ use gpui_component::{ button::{Button, ButtonVariant, ButtonVariants}, dock::PanelControl, - gray_500, green_500, h_flex, red_500, v_flex, Icon, IconName, + green_500, h_flex, neutral_500, red_500, v_flex, Icon, IconName, }; use crate::section; @@ -80,7 +80,11 @@ impl Render for IconStory { .gap_4() .child( Button::new("like1") - .icon(Icon::new(IconName::Heart).text_color(gray_500()).size_6()) + .icon( + Icon::new(IconName::Heart) + .text_color(neutral_500()) + .size_6(), + ) .with_variant(ButtonVariant::Ghost), ) .child( diff --git a/crates/ui/src/button/toggle.rs b/crates/ui/src/button/toggle.rs index 9db6b828..f590863f 100644 --- a/crates/ui/src/button/toggle.rs +++ b/crates/ui/src/button/toggle.rs @@ -7,7 +7,7 @@ use gpui::{ }; use smallvec::{smallvec, SmallVec}; -use crate::{h_flex, ActiveTheme, Disableable, Icon, Sizable, Size, StyleSized as _, StyledExt}; +use crate::{h_flex, ActiveTheme, Disableable, Icon, Sizable, Size, StyledExt}; #[derive(Default, Copy, Debug, Clone, PartialEq, Eq, Hash)] pub enum ToggleVariant { diff --git a/crates/ui/src/checkbox.rs b/crates/ui/src/checkbox.rs index 50a7f3bd..126df45d 100644 --- a/crates/ui/src/checkbox.rs +++ b/crates/ui/src/checkbox.rs @@ -1,6 +1,6 @@ use crate::{ text::Text, v_flex, ActiveTheme, Disableable, IconName, Selectable, Sizable, Size, - StyleSized as _, StyledExt as _, + StyledExt as _, }; use gpui::{ div, prelude::FluentBuilder as _, px, relative, rems, svg, AnyElement, App, Div, ElementId, diff --git a/crates/ui/src/color_picker.rs b/crates/ui/src/color_picker.rs index e536dfa5..49225379 100644 --- a/crates/ui/src/color_picker.rs +++ b/crates/ui/src/color_picker.rs @@ -187,8 +187,8 @@ impl ColorPicker { state: state.clone(), featured_colors: vec![ crate::black(), - crate::gray_600(), - crate::gray_400(), + crate::neutral_600(), + crate::neutral_400(), crate::white(), crate::red_600(), crate::orange_600(), diff --git a/crates/ui/src/highlighter/registry.rs b/crates/ui/src/highlighter/registry.rs index 5a40c8a2..62220e2b 100644 --- a/crates/ui/src/highlighter/registry.rs +++ b/crates/ui/src/highlighter/registry.rs @@ -338,17 +338,17 @@ impl StatusColors { #[inline] pub fn hint(&self) -> Hsla { - self.hint.unwrap_or(crate::gray_500()) + self.hint.unwrap_or(crate::neutral_500()) } #[inline] pub fn hint_background(&self) -> Hsla { - self.hint_background.unwrap_or(crate::gray_200()) + self.hint_background.unwrap_or(crate::neutral_200()) } #[inline] pub fn hint_border(&self) -> Hsla { - self.hint_border.unwrap_or(crate::gray_500()) + self.hint_border.unwrap_or(crate::neutral_500()) } } diff --git a/crates/ui/src/input/hover_popover.rs b/crates/ui/src/input/hover_popover.rs index 66cdf0ab..edda16ba 100644 --- a/crates/ui/src/input/hover_popover.rs +++ b/crates/ui/src/input/hover_popover.rs @@ -9,7 +9,7 @@ use crate::{ highlighter::LanguageRegistry, input::{InputState, Marker}, text::TextView, - ActiveTheme as _, StyleSized as _, + ActiveTheme as _, StyledExt as _, }; pub struct DiagnosticPopover { diff --git a/crates/ui/src/input/otp_input.rs b/crates/ui/src/input/otp_input.rs index 989494be..021800d0 100644 --- a/crates/ui/src/input/otp_input.rs +++ b/crates/ui/src/input/otp_input.rs @@ -6,7 +6,7 @@ use gpui::{ }; use super::{blink_cursor::BlinkCursor, InputEvent}; -use crate::{h_flex, v_flex, ActiveTheme, Icon, IconName, Sizable, Size, StyleSized as _}; +use crate::{h_flex, v_flex, ActiveTheme, Icon, IconName, Sizable, Size, StyledExt as _}; pub struct OtpState { focus_handle: FocusHandle, diff --git a/crates/ui/src/radio.rs b/crates/ui/src/radio.rs index 3e219e5e..78128b22 100644 --- a/crates/ui/src/radio.rs +++ b/crates/ui/src/radio.rs @@ -1,8 +1,6 @@ use std::rc::Rc; -use crate::{ - h_flex, text::Text, v_flex, ActiveTheme, AxisExt, IconName, StyleSized as _, StyledExt, -}; +use crate::{h_flex, text::Text, v_flex, ActiveTheme, AxisExt, IconName, StyledExt}; use gpui::{ div, prelude::FluentBuilder, relative, svg, AnyElement, App, Axis, Div, ElementId, InteractiveElement, IntoElement, ParentElement, RenderOnce, SharedString, diff --git a/crates/ui/src/styled.rs b/crates/ui/src/styled.rs index 94ccc4e4..4f350324 100644 --- a/crates/ui/src/styled.rs +++ b/crates/ui/src/styled.rs @@ -170,6 +170,17 @@ pub trait StyledExt: Styled + Sized { .shadow_lg() .rounded(cx.theme().radius) } + + /// TODO: Remove this after PR is merged + /// https://github.com/zed-industries/zed/pull/33361 + fn shadow_xs(self) -> Self { + self.shadow(vec![BoxShadow { + color: hsla(0., 0., 0., 0.05), + offset: point(px(0.), px(1.)), + blur_radius: px(2.), + spread_radius: px(0.), + }]) + } } impl StyledExt for E {} @@ -358,7 +369,6 @@ pub trait Sizable: Sized { #[allow(unused)] pub trait StyleSized { - fn shadow_xs(self) -> Self; fn input_text_size(self, size: Size) -> Self; fn input_size(self, size: Size) -> Self; fn input_pl(self, size: Size) -> Self; @@ -480,17 +490,6 @@ impl StyleSized for T { _ => self.text_base(), } } - - /// TODO: Remove this after PR is merged - /// https://github.com/zed-industries/zed/pull/33361 - fn shadow_xs(self) -> Self { - self.shadow(vec![BoxShadow { - color: hsla(0., 0., 0., 0.05), - offset: point(px(0.), px(1.)), - blur_radius: px(2.), - spread_radius: px(0.), - }]) - } } pub trait AxisExt { diff --git a/crates/ui/src/tab/tab.rs b/crates/ui/src/tab/tab.rs index dedfd82d..680a1c73 100644 --- a/crates/ui/src/tab/tab.rs +++ b/crates/ui/src/tab/tab.rs @@ -1,8 +1,6 @@ use std::sync::Arc; -use crate::{ - h_flex, ActiveTheme, Icon, IconName, Selectable, Sizable, Size, StyleSized as _, StyledExt, -}; +use crate::{h_flex, ActiveTheme, Icon, IconName, Selectable, Sizable, Size, StyledExt}; use gpui::prelude::FluentBuilder as _; use gpui::{ div, px, AnyElement, App, ClickEvent, Div, Edges, ElementId, Hsla, InteractiveElement, diff --git a/crates/ui/src/theme.rs b/crates/ui/src/theme.rs index 1aba2f95..71dacdd2 100644 --- a/crates/ui/src/theme.rs +++ b/crates/ui/src/theme.rs @@ -349,7 +349,7 @@ impl ThemeColor { warning_hover: yellow_500().opacity(0.9), warning_foreground: gray_50(), overlay: black().opacity(0.05), - window_border: neutral_300(), + window_border: neutral_200(), } } @@ -448,7 +448,7 @@ impl ThemeColor { warning_foreground: yellow_50(), warning_hover: yellow_900().lighten(0.1), overlay: white().opacity(0.03), - window_border: neutral_700(), + window_border: neutral_800(), } } }