From 9948b10689ae98312f0740ecb09fea26e56031b0 Mon Sep 17 00:00:00 2001 From: edouard Date: Thu, 1 Dec 2022 16:52:12 +0100 Subject: [PATCH] Smooth border color --- gui/src/app/view/spend/detail.rs | 15 ++++++--------- gui/src/ui/color.rs | 6 ++++++ gui/src/ui/component/button.rs | 2 +- gui/src/ui/component/card.rs | 2 ++ gui/src/ui/component/container.rs | 2 +- gui/src/ui/component/mod.rs | 2 +- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/gui/src/app/view/spend/detail.rs b/gui/src/app/view/spend/detail.rs index 1646c6b9..fc64fe42 100644 --- a/gui/src/app/view/spend/detail.rs +++ b/gui/src/app/view/spend/detail.rs @@ -492,15 +492,12 @@ pub fn sign_action<'a>( } else { Column::new() .push( - card::simple( - Column::new() - .spacing(20) - .width(Length::Fill) - .push("Please connect a hardware wallet") - .push(button::primary(None, "Refresh").on_press(Message::Reload)) - .align_items(Alignment::Center), - ) - .width(Length::Fill), + Column::new() + .spacing(20) + .width(Length::Fill) + .push("Please connect a hardware wallet") + .push(button::primary(None, "Refresh").on_press(Message::Reload)) + .align_items(Alignment::Center), ) .width(Length::Fill) }) diff --git a/gui/src/ui/color.rs b/gui/src/ui/color.rs index b64cfbbe..3e87a13a 100644 --- a/gui/src/ui/color.rs +++ b/gui/src/ui/color.rs @@ -6,6 +6,12 @@ pub const BACKGROUND: Color = Color::from_rgb( 0xF8 as f32 / 255.0, ); +pub const BORDER_GREY: Color = Color::from_rgb( + 0xd0 as f32 / 255.0, + 0xd7 as f32 / 255.0, + 0xde as f32 / 255.0, +); + pub const FOREGROUND: Color = Color::WHITE; pub const PRIMARY: Color = Color::BLACK; diff --git a/gui/src/ui/component/button.rs b/gui/src/ui/component/button.rs index 8b7e63ca..2ecc0fe6 100644 --- a/gui/src/ui/component/button.rs +++ b/gui/src/ui/component/button.rs @@ -86,7 +86,7 @@ impl button::StyleSheet for Style { background: Color::TRANSPARENT.into(), border_radius: 10.0, border_width: 1.2, - border_color: color::BACKGROUND, + border_color: color::BORDER_GREY, text_color: Color::BLACK, }, } diff --git a/gui/src/ui/component/card.rs b/gui/src/ui/component/card.rs index 811a22d1..3578dfce 100644 --- a/gui/src/ui/component/card.rs +++ b/gui/src/ui/component/card.rs @@ -15,6 +15,8 @@ impl widget::container::StyleSheet for SimpleCardStyle { fn appearance(&self, _style: &Self::Style) -> widget::container::Appearance { widget::container::Appearance { border_radius: 10.0, + border_color: color::BORDER_GREY, + border_width: 1.0, background: color::FOREGROUND.into(), ..widget::container::Appearance::default() } diff --git a/gui/src/ui/component/container.rs b/gui/src/ui/component/container.rs index 1b35fbc0..5eff7dcb 100644 --- a/gui/src/ui/component/container.rs +++ b/gui/src/ui/component/container.rs @@ -17,7 +17,7 @@ impl container::StyleSheet for Style { Self::Sidebar => container::Appearance { background: color::FOREGROUND.into(), border_width: 1.0, - border_color: color::SECONDARY, + border_color: color::BORDER_GREY, ..container::Appearance::default() }, } diff --git a/gui/src/ui/component/mod.rs b/gui/src/ui/component/mod.rs index 381f6563..cc41b055 100644 --- a/gui/src/ui/component/mod.rs +++ b/gui/src/ui/component/mod.rs @@ -23,7 +23,7 @@ impl iced::widget::container::StyleSheet for SepStyle { type Style = iced::Theme; fn appearance(&self, _style: &Self::Style) -> iced::widget::container::Appearance { iced::widget::container::Appearance { - background: color::SECONDARY.into(), + background: color::BORDER_GREY.into(), ..iced::widget::container::Appearance::default() } }