migrate ui crate to new theme tokens
This commit is contained in:
@@ -577,7 +577,7 @@ impl PopupMenu {
|
||||
checked: bool,
|
||||
icon: Option<Icon>,
|
||||
_: &mut Window,
|
||||
_: &mut Context<Self>,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Option<impl IntoElement> {
|
||||
if !has_icon {
|
||||
return None;
|
||||
@@ -586,7 +586,7 @@ impl PopupMenu {
|
||||
let icon = if let Some(icon) = icon {
|
||||
icon.clone()
|
||||
} else if checked {
|
||||
Icon::new(IconName::Check)
|
||||
Icon::new(IconName::Check).text_color(cx.theme().accent)
|
||||
} else {
|
||||
Icon::empty()
|
||||
};
|
||||
@@ -657,7 +657,7 @@ impl PopupMenu {
|
||||
.my_0p5()
|
||||
.mx_neg_1()
|
||||
.border_b(px(2.))
|
||||
.border_color(cx.theme().border)
|
||||
.border_color(cx.theme().border_faint)
|
||||
.disabled(true),
|
||||
PopupMenuItem::Label(label) => this.disabled(true).cursor_default().child(
|
||||
h_flex().cursor_default().items_center().gap_x_1().child(
|
||||
@@ -790,7 +790,8 @@ impl Render for PopupMenu {
|
||||
|
||||
let options = RenderOptions {
|
||||
has_left_icon,
|
||||
radius: cx.theme().radius.min(px(8.)),
|
||||
// Items sit p_1 (4px) inside the surface plate; keep corners concentric.
|
||||
radius: px(theme::inset_radius(theme::surface_radius(), 4.0)),
|
||||
};
|
||||
|
||||
v_flex()
|
||||
|
||||
Reference in New Issue
Block a user