From 6eb63dfd28c68c54d3a6f27ce5638ac4987c80ad Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Fri, 5 Jul 2024 11:26:11 +0800 Subject: [PATCH] Removed Button shadow in Light mode for ghost style button. --- crates/ui/src/button.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/crates/ui/src/button.rs b/crates/ui/src/button.rs index df3f7138..3d26717f 100644 --- a/crates/ui/src/button.rs +++ b/crates/ui/src/button.rs @@ -237,16 +237,6 @@ impl RenderOnce for Button { .border_color(disabled_style.border) }) .border_1() - .map(|this| match theme.mode { - ThemeMode::Light => { - if self.disabled { - this - } else { - this.shadow_sm() - } - } - ThemeMode::Dark => this, - }) .child({ let text_color = if self.disabled { normal_style.fg.opacity(0.6) @@ -323,7 +313,7 @@ impl ButtonStyle { ButtonStyle::Secondary => cx.theme().secondary_hover, ButtonStyle::Danger => cx.theme().destructive_hover, ButtonStyle::Outline => cx.theme().secondary_hover, - ButtonStyle::Ghost => cx.theme().secondary_hover, + ButtonStyle::Ghost => cx.theme().secondary, }; let border = self.border_color(cx); let fg = self.text_color(cx);