From 3a9e71a7f92832b129e584d5eb4b6cf497cbe36a Mon Sep 17 00:00:00 2001 From: Floyd Wang Date: Wed, 8 Jan 2025 18:34:49 +0800 Subject: [PATCH] popup_menu: Better checked style --- crates/ui/src/popup_menu.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/ui/src/popup_menu.rs b/crates/ui/src/popup_menu.rs index 40254102..2471750f 100644 --- a/crates/ui/src/popup_menu.rs +++ b/crates/ui/src/popup_menu.rs @@ -469,12 +469,11 @@ impl PopupMenu { let icon = h_flex() .w_3p5() .h_3p5() - .items_center() .justify_center() .text_sm() .map(|this| { if let Some(icon) = icon { - this.child(icon.clone().small()) + this.child(icon.clone().xsmall()) } else { this.children(icon_placeholder.clone()) } @@ -553,7 +552,7 @@ impl Render for PopupMenu { .relative() .text_sm() .py_0() - .px_2() + .px_1() .rounded_md() .items_center() .on_mouse_enter(cx.listener(move |this, _, cx| { @@ -580,7 +579,7 @@ impl Render for PopupMenu { h_flex() .min_h(ITEM_HEIGHT) .items_center() - .gap_x_1p5() + .gap_x_1() .children(Self::render_icon( has_icon, None, cx, )) @@ -604,7 +603,7 @@ impl Render for PopupMenu { h_flex() .h(ITEM_HEIGHT) .items_center() - .gap_x_1p5() + .gap_x_1() .children(Self::render_icon( has_icon, icon.clone(), @@ -632,7 +631,7 @@ impl Render for PopupMenu { h_flex() .size_full() .items_center() - .gap_x_1p5() + .gap_x_1() .children(Self::render_icon( has_icon, icon.clone(),