From cfa737196908aaf199c3ccc0fa217d33407dbd40 Mon Sep 17 00:00:00 2001 From: edouardparis Date: Mon, 3 Feb 2025 10:57:45 +0100 Subject: [PATCH] fix hw buttons: use secondary button --- liana-gui/src/app/view/hw.rs | 21 ++++++--------------- liana-gui/src/app/view/psbt.rs | 2 +- liana-gui/src/installer/view/mod.rs | 18 ++++++------------ 3 files changed, 13 insertions(+), 28 deletions(-) diff --git a/liana-gui/src/app/view/hw.rs b/liana-gui/src/app/view/hw.rs index 00759e7d..b57ba0c0 100644 --- a/liana-gui/src/app/view/hw.rs +++ b/liana-gui/src/app/view/hw.rs @@ -69,7 +69,7 @@ pub fn hw_list_view( kind, pairing_code, .. } => hw::locked_hardware_wallet(kind, pairing_code.as_ref()), }) - .style(theme::button::container_border) + .style(theme::button::secondary) .width(Length::Fill); if !signing { if let HardwareWallet::Supported { registered, .. } = hw { @@ -78,10 +78,7 @@ pub fn hw_list_view( } } } - Container::new(bttn) - .width(Length::Fill) - .style(theme::card::simple) - .into() + bttn.into() } pub fn hw_list_view_for_registration( @@ -137,15 +134,12 @@ pub fn hw_list_view_for_registration( kind, pairing_code, .. } => hw::locked_hardware_wallet(kind, pairing_code.as_ref()), }) - .style(theme::button::container_border) + .style(theme::button::secondary) .width(Length::Fill); if !processing && hw.is_supported() { bttn = bttn.on_press(Message::SelectHardwareWallet(i)); } - Container::new(bttn) - .width(Length::Fill) - .style(theme::card::simple) - .into() + bttn.into() } pub fn hw_list_view_verify_address( @@ -222,13 +216,10 @@ pub fn hw_list_view_verify_address( ), }; let mut bttn = Button::new(content) - .style(theme::button::container_border) + .style(theme::button::secondary) .width(Length::Fill); if selectable && hw.is_supported() { bttn = bttn.on_press(Message::SelectHardwareWallet(i)); } - Container::new(bttn) - .width(Length::Fill) - .style(theme::card::simple) - .into() + bttn.into() } diff --git a/liana-gui/src/app/view/psbt.rs b/liana-gui/src/app/view/psbt.rs index fb39a587..81d39af5 100644 --- a/liana-gui/src/app/view/psbt.rs +++ b/liana-gui/src/app/view/psbt.rs @@ -1050,7 +1050,7 @@ pub fn sign_action<'a>( }) .on_press(Message::Spend(SpendTxMessage::SelectHotSigner)) .padding(10) - .style(theme::button::container_border) + .style(theme::button::secondary) .width(Length::Fill) })) .width(Length::Fill), diff --git a/liana-gui/src/installer/view/mod.rs b/liana-gui/src/installer/view/mod.rs index 7fc106d3..4777ba75 100644 --- a/liana-gui/src/installer/view/mod.rs +++ b/liana-gui/src/installer/view/mod.rs @@ -326,7 +326,7 @@ pub fn signer_xpubs<'a>( ) .on_press(Message::UseHotSigner) .padding(10) - .style(theme::button::transparent_border) + .style(theme::button::secondary) .width(Length::Fill), ) .push_maybe(if xpubs.is_empty() { @@ -1613,15 +1613,12 @@ pub fn hw_list_view( kind, pairing_code, .. } => hw::locked_hardware_wallet(kind, pairing_code.as_ref()), }) - .style(theme::button::container_border) + .style(theme::button::secondary) .width(Length::Fill); if !processing && hw.is_supported() { bttn = bttn.on_press(Message::Select(i)); } - Container::new(bttn) - .width(Length::Fill) - .style(theme::card::simple) - .into() + bttn.into() } pub fn key_list_view<'a>( @@ -1633,7 +1630,7 @@ pub fn key_list_view<'a>( chosen: bool, device_must_support_taproot: bool, ) -> Element<'a, Message> { - let bttn = Button::new(if chosen { + Button::new(if chosen { hw::selected_hardware_wallet( kind.map(|k| k.to_string()).unwrap_or_default(), version, @@ -1669,11 +1666,8 @@ pub fn key_list_view<'a>( .width(Length::Fill) .on_press(Message::DefineDescriptor( message::DefineDescriptor::KeyModal(message::ImportKeyModal::SelectKey(i)), - )); - Container::new(bttn) - .width(Length::Fill) - .style(theme::card::simple) - .into() + )) + .into() } pub fn backup_mnemonic<'a>(