From 47093a3eafcb5fc12a3cedaa045830c7e9b3ded5 Mon Sep 17 00:00:00 2001 From: edouardparis Date: Wed, 26 Mar 2025 11:04:26 +0100 Subject: [PATCH] clean usage of color outside of theme palette --- liana-gui/src/installer/view/editor/template/custom.rs | 4 ++-- liana-ui/src/component/button.rs | 6 +++--- liana-ui/src/component/event.rs | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/liana-gui/src/installer/view/editor/template/custom.rs b/liana-gui/src/installer/view/editor/template/custom.rs index 75559d39..78d0b2c1 100644 --- a/liana-gui/src/installer/view/editor/template/custom.rs +++ b/liana-gui/src/installer/view/editor/template/custom.rs @@ -36,12 +36,12 @@ pub fn custom_template_description(progress: (usize, usize)) -> Element<'static, .max_width(800.0) .push(Container::new( p1_regular("For this setup you will need to define your primary and recovery spending policies. For security reasons, we suggest you use a separate Hardware Wallet for each key belonging to them.") - .color(color::GREY_2) + .style(theme::text::secondary) .align_x(alignment::Horizontal::Left) ).align_x(alignment::Horizontal::Left).width(Length::Fill)) .push(Container::new( p1_regular("The keys belonging to your primary policy can always spend. Those belonging to the recovery policies will be able to spend only after a defined time of wallet inactivity, allowing for secure recovery and advanced spending policies.") - .color(color::GREY_2) + .style(theme::text::secondary) .align_x(alignment::Horizontal::Left) ).align_x(alignment::Horizontal::Left).width(Length::Fill)) .push(image::custom_template_description().width(Length::Fill)) diff --git a/liana-ui/src/component/button.rs b/liana-ui/src/component/button.rs index ef580b4a..9d4e46ba 100644 --- a/liana-ui/src/component/button.rs +++ b/liana-ui/src/component/button.rs @@ -1,16 +1,16 @@ -use crate::{color, theme, widget::*}; +use crate::{theme, widget::*}; use iced::alignment::{Horizontal, Vertical}; use iced::widget::{button, container, row}; use super::text::text; pub fn menu<'a, T: 'a>(icon: Option>, t: &'static str) -> Button<'a, T> { - button::Button::new(content_menu(icon.map(|i| i.color(color::GREY_3)), t).padding(10)) + button::Button::new(content_menu(icon.map(|i| i.style(theme::text::secondary)), t).padding(10)) .style(theme::button::menu) } pub fn menu_active<'a, T: 'a>(icon: Option>, t: &'static str) -> Button<'a, T> { - button::Button::new(content_menu(icon.map(|i| i.color(color::GREY_3)), t).padding(10)) + button::Button::new(content_menu(icon.map(|i| i.style(theme::text::secondary)), t).padding(10)) .style(theme::button::menu_pressed) } diff --git a/liana-ui/src/component/event.rs b/liana-ui/src/component/event.rs index db5cacf9..8a09bf24 100644 --- a/liana-ui/src/component/event.rs +++ b/liana-ui/src/component/event.rs @@ -1,5 +1,4 @@ use crate::{ - color, component::{amount, badge, text}, theme, widget::*, @@ -56,7 +55,7 @@ pub fn confirmed_outgoing_event( .format("%b. %d, %Y - %T") .to_string() ) - .color(color::GREY_3) + .style(theme::text::secondary) ) ) .spacing(10) @@ -120,7 +119,7 @@ pub fn confirmed_incoming_event( .format("%b. %d, %Y - %T") .to_string() ) - .color(color::GREY_3) + .style(theme::text::secondary) ) ) .spacing(10)