From 2b5fe01cf04d9686b63915c284cb27cabf4d4b5a Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Wed, 13 Dec 2023 13:58:22 +0100 Subject: [PATCH] gui: make the trash button prettier After feedback from Kevin. --- gui/src/launcher.rs | 4 +++- gui/ui/src/theme.rs | 21 ++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/gui/src/launcher.rs b/gui/src/launcher.rs index f6302e87..032d719b 100644 --- a/gui/src/launcher.rs +++ b/gui/src/launcher.rs @@ -179,7 +179,9 @@ impl Launcher { *choice, ), )) - .style(theme::Button::Destructive), + .style( + theme::Button::SecondaryDestructive, + ), "Delete wallet", tooltip::Position::Right, )) diff --git a/gui/ui/src/theme.rs b/gui/ui/src/theme.rs index 4d09261b..20fb3380 100644 --- a/gui/ui/src/theme.rs +++ b/gui/ui/src/theme.rs @@ -462,6 +462,7 @@ pub enum Button { Primary, Secondary, Destructive, + SecondaryDestructive, Transparent, TransparentBorder, Border, @@ -483,14 +484,16 @@ impl button::StyleSheet for Theme { border_color: color::GREY_7, text_color: color::GREY_2, }, - Button::Secondary | Button::Border => button::Appearance { - shadow_offset: iced::Vector::default(), - background: iced::Color::TRANSPARENT.into(), - border_radius: 25.0, - border_width: 1.0, - border_color: color::GREY_7, - text_color: color::GREY_2, - }, + Button::Secondary | Button::SecondaryDestructive | Button::Border => { + button::Appearance { + shadow_offset: iced::Vector::default(), + background: iced::Color::TRANSPARENT.into(), + border_radius: 25.0, + border_width: 1.0, + border_color: color::GREY_7, + text_color: color::GREY_2, + } + } Button::Destructive => button::Appearance { shadow_offset: iced::Vector::default(), background: iced::Color::TRANSPARENT.into(), @@ -560,7 +563,7 @@ impl button::StyleSheet for Theme { border_color: iced::Color::TRANSPARENT, text_color: color::LIGHT_BLACK, }, - Button::Destructive => button::Appearance { + Button::Destructive | Button::SecondaryDestructive => button::Appearance { shadow_offset: iced::Vector::default(), background: color::RED.into(), border_radius: 25.0,