diff --git a/gui/src/app/view/psbt.rs b/gui/src/app/view/psbt.rs index a7035cad6..4b5378cff 100644 --- a/gui/src/app/view/psbt.rs +++ b/gui/src/app/view/psbt.rs @@ -1135,7 +1135,7 @@ pub fn update_spend_view<'a>( Message::ImportSpend(ImportSpendMessage::PsbtEdited(msg)) }) .warning("Please enter the correct base64 encoded PSBT") - .size(20) + .size(P1_SIZE) .padding(10), ) .push(Row::new().push(Space::with_width(Length::Fill)).push( diff --git a/gui/src/app/view/psbts.rs b/gui/src/app/view/psbts.rs index 74f9dd749..3bc28d8bb 100644 --- a/gui/src/app/view/psbts.rs +++ b/gui/src/app/view/psbts.rs @@ -31,7 +31,7 @@ pub fn import_psbt_view<'a>( Message::ImportSpend(ImportSpendMessage::PsbtEdited(msg)) }) .warning("Please enter a base64 encoded PSBT") - .size(20) + .size(P1_SIZE) .padding(10), ) .push(Row::new().push(Space::with_width(Length::Fill)).push( diff --git a/gui/src/app/view/recovery.rs b/gui/src/app/view/recovery.rs index b21f94d3d..52e435c25 100644 --- a/gui/src/app/view/recovery.rs +++ b/gui/src/app/view/recovery.rs @@ -72,7 +72,7 @@ pub fn recovery<'a>( )) }) .warning("Invalid Bitcoin address") - .size(20) + .size(P1_SIZE) .padding(10), ) .max_width(500) @@ -85,7 +85,7 @@ pub fn recovery<'a>( Message::CreateSpend(CreateSpendMessage::FeerateEdited(msg)) }) .warning("Invalid feerate") - .size(20) + .size(P1_SIZE) .padding(10), ) .width(Length::Fixed(200.0)), diff --git a/gui/src/app/view/settings.rs b/gui/src/app/view/settings.rs index 736589221..e5390e46e 100644 --- a/gui/src/app/view/settings.rs +++ b/gui/src/app/view/settings.rs @@ -276,7 +276,7 @@ pub fn bitcoind_edit<'a>( |value| SettingsEditMessage::FieldEdited("cookie_file_path", value), ) .warning("Please enter a valid filesystem path") - .size(20) + .size(P1_SIZE) .padding(5), ) .spacing(5), @@ -288,7 +288,7 @@ pub fn bitcoind_edit<'a>( SettingsEditMessage::FieldEdited("user", value) }) .warning("Please enter a valid user") - .size(20) + .size(P1_SIZE) .padding(5), ) .push( @@ -296,7 +296,7 @@ pub fn bitcoind_edit<'a>( SettingsEditMessage::FieldEdited("password", value) }) .warning("Please enter a valid password") - .size(20) + .size(P1_SIZE) .padding(5), ) .spacing(10), @@ -311,7 +311,7 @@ pub fn bitcoind_edit<'a>( SettingsEditMessage::FieldEdited("socket_address", value) }) .warning("Please enter a valid address") - .size(20) + .size(P1_SIZE) .padding(5), ) .spacing(5), @@ -512,7 +512,7 @@ pub fn rescan<'a>( form::Form::new_trimmed("2022", year, |value| { SettingsEditMessage::FieldEdited("rescan_year", value) }) - .size(20) + .size(P1_SIZE) .padding(5), ) .push(text("Month:").bold().small()) @@ -520,7 +520,7 @@ pub fn rescan<'a>( form::Form::new_trimmed("12", month, |value| { SettingsEditMessage::FieldEdited("rescan_month", value) }) - .size(20) + .size(P1_SIZE) .padding(5), ) .push(text("Day:").bold().small()) @@ -528,7 +528,7 @@ pub fn rescan<'a>( form::Form::new_trimmed("31", day, |value| { SettingsEditMessage::FieldEdited("rescan_day", value) }) - .size(20) + .size(P1_SIZE) .padding(5), ) .align_items(Alignment::Center) @@ -674,7 +674,7 @@ pub fn wallet_settings<'a>( ) }) .warning("Please enter correct alias") - .size(20) + .size(P1_SIZE) .padding(10), ), ) diff --git a/gui/src/app/view/spend/mod.rs b/gui/src/app/view/spend/mod.rs index 39bfc1b4e..514522b1c 100644 --- a/gui/src/app/view/spend/mod.rs +++ b/gui/src/app/view/spend/mod.rs @@ -194,7 +194,7 @@ pub fn create_spend_tx<'a>( "Feerate must be an integer less than \ or equal to 1000 sats/vbyte", ) - .size(20) + .size(P1_SIZE) .padding(10), ) .width(Length::FillPortion(1)), @@ -346,7 +346,7 @@ pub fn recipient_view<'a>( CreateSpendMessage::RecipientEdited(index, "address", msg) }) .warning("Invalid address (maybe it is for another network?)") - .size(20) + .size(P1_SIZE) .padding(10), ), ) @@ -365,7 +365,7 @@ pub fn recipient_view<'a>( CreateSpendMessage::RecipientEdited(index, "label", msg) }) .warning("Label length is too long (> 100 char)") - .size(20) + .size(P1_SIZE) .padding(10), ), ) @@ -382,7 +382,9 @@ pub fn recipient_view<'a>( .push_maybe(if is_max_selected { Some( Container::new( - text(amount.value.clone()).size(20).style(color::GREY_2), + text(amount.value.clone()) + .size(P1_SIZE) + .style(color::GREY_2), ) .padding(10) .width(Length::Fill), @@ -397,7 +399,7 @@ pub fn recipient_view<'a>( .warning( "Invalid amount. (Note amounts lower than 0.00005 BTC are invalid.)", ) - .size(20) + .size(P1_SIZE) .padding(10)) } else { None diff --git a/gui/src/app/view/transactions.rs b/gui/src/app/view/transactions.rs index d69f926b9..f68e1c2ba 100644 --- a/gui/src/app/view/transactions.rs +++ b/gui/src/app/view/transactions.rs @@ -251,7 +251,7 @@ pub fn create_rbf_modal<'a>( "Feerate must be greater than previous value and \ less than or equal to 1000 sats/vbyte", ) - .size(20) + .size(P1_SIZE) .padding(10), ) .width(Length::Fill), diff --git a/gui/src/installer/view.rs b/gui/src/installer/view.rs index b44e7b833..4edeb8514 100644 --- a/gui/src/installer/view.rs +++ b/gui/src/installer/view.rs @@ -5,6 +5,7 @@ use iced::widget::{ use iced::{alignment, widget::progress_bar, Alignment, Length}; use async_hwi::DeviceKind; +use liana_ui::component::text; use std::path::PathBuf; use std::{collections::HashSet, str::FromStr}; @@ -484,7 +485,7 @@ pub fn import_descriptor<'a>( } else { "Failed to read the descriptor" }) - .size(20) + .size(text::P1_SIZE) .padding(10), ) .spacing(10); @@ -906,7 +907,7 @@ pub fn define_bitcoin<'a>( )) }) .warning("Please enter correct address") - .size(20) + .size(text::P1_SIZE) .padding(10), ) .spacing(10); @@ -944,7 +945,7 @@ pub fn define_bitcoin<'a>( )) }) .warning("Please enter correct path") - .size(20) + .size(text::P1_SIZE) .padding(10), ), RpcAuthType::UserPass => Row::new() @@ -956,7 +957,7 @@ pub fn define_bitcoin<'a>( )) }) .warning("Please enter correct user") - .size(20) + .size(text::P1_SIZE) .padding(10), ) .push( @@ -967,7 +968,7 @@ pub fn define_bitcoin<'a>( )) }) .warning("Please enter correct password") - .size(20) + .size(text::P1_SIZE) .padding(10), ) .spacing(10), @@ -1518,7 +1519,7 @@ pub fn edit_key_modal<'a>( } else { "Please enter correct tpub with origin and without appended derivation path" }) - .size(20) + .size(text::P1_SIZE) .padding(10), ) .spacing(10) @@ -1568,7 +1569,7 @@ pub fn edit_key_modal<'a>( )) }) .warning("Please enter correct alias") - .size(20) + .size(text::P1_SIZE) .padding(10), ) } else { diff --git a/gui/ui/src/component/text.rs b/gui/ui/src/component/text.rs index 80dd13e3f..7fe714795 100644 --- a/gui/ui/src/component/text.rs +++ b/gui/ui/src/component/text.rs @@ -130,6 +130,6 @@ impl Text for iced::widget::Text<'_, iced::Renderer> { self.font(font::BOLD) } fn small(self) -> Self { - self.size(20) + self.size(P1_SIZE) } } diff --git a/gui/ui/src/icon.rs b/gui/ui/src/icon.rs index 3af767124..c36900bc4 100644 --- a/gui/ui/src/icon.rs +++ b/gui/ui/src/icon.rs @@ -1,4 +1,4 @@ -use crate::widget::*; +use crate::{component::text::P1_SIZE, widget::*}; use iced::{alignment, Font, Length}; const BOOTSTRAP_ICONS: Font = Font::External { @@ -11,7 +11,7 @@ fn bootstrap_icon(unicode: char) -> Text<'static> { .font(BOOTSTRAP_ICONS) .width(Length::Fixed(20.0)) .horizontal_alignment(alignment::Horizontal::Center) - .size(20) + .size(P1_SIZE) } pub fn cross_icon() -> Text<'static> { @@ -128,7 +128,7 @@ fn iconex_icon(unicode: char) -> Text<'static> { .font(ICONEX_ICONS) .width(Length::Fixed(20.0)) .horizontal_alignment(alignment::Horizontal::Center) - .size(20) + .size(P1_SIZE) } pub fn arrow_repeat() -> Text<'static> {