change labels font weight for lists

This commit is contained in:
edouard 2023-10-23 18:21:10 +02:00
parent c170f7b25b
commit 8e806404c4
5 changed files with 17 additions and 13 deletions

View File

@ -76,7 +76,7 @@ fn coin_list_view<'a>(
.push(if !collapsed {
if let Some(label) = labels.get(&outpoint) {
if !label.is_empty() {
Container::new(p1_bold(label)).width(Length::Fill)
Container::new(p1_regular(label)).width(Length::Fill)
} else if let Some(label) = labels.get(&txid) {
Container::new(
Row::new()
@ -85,9 +85,9 @@ fn coin_list_view<'a>(
// It it not possible to know if a coin is a
// change coin or not so for now, From is
// enough
p1_bold("From").style(color::GREY_3),
p1_regular("From").style(color::GREY_3),
)
.push(p1_bold(label)),
.push(p1_regular(label)),
)
.width(Length::Fill)
} else {
@ -102,9 +102,9 @@ fn coin_list_view<'a>(
// It it not possible to know if a coin is a
// change coin or not so for now, From is
// enough
p1_bold("From").style(color::GREY_3),
p1_regular("From").style(color::GREY_3),
)
.push(p1_bold(label)),
.push(p1_regular(label)),
)
.width(Length::Fill)
} else {

View File

@ -157,7 +157,7 @@ fn event_list_view(i: usize, event: &HistoryTransaction) -> Column<'_, Message>
}
.to_string(),
) {
Some(p1_bold(label))
Some(p1_regular(label))
} else {
event
.labels
@ -166,7 +166,9 @@ fn event_list_view(i: usize, event: &HistoryTransaction) -> Column<'_, Message>
.unwrap()
.to_string(),
)
.map(|label| p1_bold(format!("address label: {}", label)).style(color::GREY_3))
.map(|label| {
p1_regular(format!("address label: {}", label)).style(color::GREY_3)
})
};
if event.is_external() {
if !event.change_indexes.contains(&output_index) {

View File

@ -127,7 +127,7 @@ fn spend_tx_list_view(i: usize, tx: &SpendTx) -> Element<'_, Message> {
.push_maybe(
tx.labels
.get(&tx.psbt.unsigned_tx.txid().to_string())
.map(p1_bold),
.map(p1_regular),
)
.spacing(10)
.align_items(Alignment::Center)

View File

@ -360,7 +360,7 @@ fn coin_list_view<'a>(
}))
.push(
if let Some(label) = coins_labels.get(&coin.outpoint.to_string()) {
Container::new(p1_bold(label)).width(Length::Fill)
Container::new(p1_regular(label)).width(Length::Fill)
} else if let Some(label) = coins_labels.get(&coin.outpoint.txid.to_string()) {
Container::new(
Row::new()
@ -369,13 +369,13 @@ fn coin_list_view<'a>(
// It it not possible to know if a coin is a
// change coin or not so for now, From is
// enough
p1_bold("From").style(color::GREY_3),
p1_regular("From").style(color::GREY_3),
)
.push(p1_bold(label)),
.push(p1_regular(label)),
)
.width(Length::Fill)
} else {
Container::new(p1_bold("")).width(Length::Fill)
Container::new(p1_regular("")).width(Length::Fill)
},
)
.push(if coin.spend_info.is_some() {

View File

@ -99,7 +99,9 @@ fn tx_list_view(i: usize, tx: &HistoryTransaction) -> Element<'_, Message> {
})
.push(
Column::new()
.push_maybe(tx.labels.get(&tx.tx.txid().to_string()).map(p1_bold))
.push_maybe(
tx.labels.get(&tx.tx.txid().to_string()).map(p1_regular),
)
.push_maybe(tx.time.map(|t| {
Container::new(
text(format!(