Merge #1071: Use text size constant
d722ca1e4d9008df5bcf5cea3af531ed8de75209 Use text size constant (edouardparis) Pull request description: this is preparatory work for #597 ACKs for top commit: edouardparis: Self-ACK d722ca1e4d9008df5bcf5cea3af531ed8de75209 Tree-SHA512: 882fefe1685e34b252e6ca0dba9e2519b4889448cb410c3df542b2ca111baccbd2697b6ca191caa069ffec55dbdc0182c76de75a36f321f4927b6e81229db07b
This commit is contained in:
commit
1418e18842
@ -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(
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -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)),
|
||||
|
||||
@ -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),
|
||||
),
|
||||
)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -130,6 +130,6 @@ impl Text for iced::widget::Text<'_, iced::Renderer<Theme>> {
|
||||
self.font(font::BOLD)
|
||||
}
|
||||
fn small(self) -> Self {
|
||||
self.size(20)
|
||||
self.size(P1_SIZE)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user