sync radius
This commit is contained in:
@@ -18,6 +18,7 @@ impl Render for Gallery {
|
||||
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
let theme = cx.theme();
|
||||
let colors = theme.colors;
|
||||
let radius = theme.radius;
|
||||
let variant = theme.variant;
|
||||
let source = gpui_native_theme::detected_source(cx);
|
||||
let mode_override = gpui_native_theme::mode_override(cx);
|
||||
@@ -105,7 +106,8 @@ impl Render for Gallery {
|
||||
.text_sm()
|
||||
.text_color(colors.muted_foreground)
|
||||
.child(format!(
|
||||
"phase C — button · source: {source} · variant: {variant:?}"
|
||||
"phase C — button · source: {source} · variant: {variant:?} · control radius {}px",
|
||||
f32::from(theme.radius.control)
|
||||
)),
|
||||
),
|
||||
)
|
||||
@@ -125,6 +127,7 @@ impl Render for Gallery {
|
||||
label,
|
||||
active,
|
||||
colors,
|
||||
radius,
|
||||
move |_, _, cx| gpui_native_theme::set_mode_override(value, cx),
|
||||
)
|
||||
})),
|
||||
@@ -146,6 +149,7 @@ impl Render for Gallery {
|
||||
label,
|
||||
active,
|
||||
colors,
|
||||
radius,
|
||||
move |_, _, cx| {
|
||||
let _ = gpui_native_theme::set_preset(value, cx);
|
||||
},
|
||||
@@ -208,7 +212,7 @@ impl Render for Gallery {
|
||||
.child(
|
||||
div()
|
||||
.size_6()
|
||||
.rounded_full()
|
||||
.rounded(radius.full)
|
||||
.border_1()
|
||||
.border_color(colors.border)
|
||||
.bg(color),
|
||||
@@ -236,7 +240,7 @@ impl Render for Gallery {
|
||||
.child(
|
||||
div()
|
||||
.size_6()
|
||||
.rounded_full()
|
||||
.rounded(radius.full)
|
||||
.border_1()
|
||||
.border_color(colors.border)
|
||||
.bg(color),
|
||||
@@ -292,6 +296,7 @@ fn chip<F>(
|
||||
label: SharedString,
|
||||
active: bool,
|
||||
colors: gpui_native_theme::ColorTokens,
|
||||
radius: gpui_native_theme::Radius,
|
||||
on_click: F,
|
||||
) -> impl IntoElement + use<F>
|
||||
where
|
||||
@@ -301,7 +306,7 @@ where
|
||||
.id(SharedString::from(id))
|
||||
.px_3()
|
||||
.py_1()
|
||||
.rounded_full()
|
||||
.rounded(radius.full)
|
||||
.border_1()
|
||||
.text_xs()
|
||||
.cursor_pointer()
|
||||
|
||||
Reference in New Issue
Block a user