migrate ui crate to new theme tokens
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use gpui::prelude::FluentBuilder;
|
||||
use gpui::{
|
||||
AnyElement, App, ElementId, InteractiveElement as _, IntoElement, ParentElement, RenderOnce,
|
||||
StyleRefinement, Styled, Window, div, relative,
|
||||
StyleRefinement, Styled, Window, div, px, relative,
|
||||
};
|
||||
use smallvec::SmallVec;
|
||||
use theme::ActiveTheme;
|
||||
@@ -95,7 +95,7 @@ impl RenderOnce for GroupBox {
|
||||
fn render(self, _: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||
let (bg, has_paddings) = match self.variant {
|
||||
GroupBoxVariant::Normal => (None, false),
|
||||
GroupBoxVariant::Fill => (Some(cx.theme().surface_background), true),
|
||||
GroupBoxVariant::Fill => (Some(cx.theme().surface), true),
|
||||
};
|
||||
|
||||
v_flex()
|
||||
@@ -120,7 +120,7 @@ impl RenderOnce for GroupBox {
|
||||
.text_color(cx.theme().text)
|
||||
.when(has_paddings, |this| this.p_2())
|
||||
.gap_4()
|
||||
.rounded(cx.theme().radius_lg)
|
||||
.rounded(px(theme::panel_radius()))
|
||||
.children(self.children),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user