ui: tx modal height
This commit is contained in:
parent
c52da4f479
commit
a0f85538e9
1 changed files with 15 additions and 9 deletions
|
@ -125,15 +125,28 @@ impl WalletTransactionModal {
|
||||||
if self.qr_code_content.is_none() && self.qr_scan_content.is_none() {
|
if self.qr_code_content.is_none() && self.qr_scan_content.is_none() {
|
||||||
ui.add_space(6.0);
|
ui.add_space(6.0);
|
||||||
|
|
||||||
// Show transaction amount status and time.
|
|
||||||
let r = View::item_rounding(0, 2, false);
|
let r = View::item_rounding(0, 2, false);
|
||||||
let mut rect = ui.available_rect_before_wrap();
|
let mut rect = ui.available_rect_before_wrap();
|
||||||
rect.set_height(WalletTransactions::TX_ITEM_HEIGHT);
|
rect.set_height(WalletTransactions::TX_ITEM_HEIGHT);
|
||||||
|
// Show transaction amount status and time.
|
||||||
WalletTransactions::tx_item_ui(ui, tx, rect, r, &data, |ui| {
|
WalletTransactions::tx_item_ui(ui, tx, rect, r, &data, |ui| {
|
||||||
// Do not show buttons on finalizing.
|
|
||||||
if self.finalizing {
|
if self.finalizing {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Show block height or buttons.
|
||||||
|
if let Some(h) = tx.height {
|
||||||
|
if h != 0 {
|
||||||
|
ui.add_space(6.0);
|
||||||
|
let height = format!("{} {}", CUBE, h.to_string());
|
||||||
|
ui.with_layout(Layout::bottom_up(Align::Max), |ui| {
|
||||||
|
ui.add_space(3.0);
|
||||||
|
ui.label(RichText::new(height)
|
||||||
|
.size(15.0)
|
||||||
|
.color(Colors::text(false)));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let wallet_loaded = wallet.foreign_api_port().is_some();
|
let wallet_loaded = wallet.foreign_api_port().is_some();
|
||||||
|
|
||||||
|
@ -181,13 +194,6 @@ impl WalletTransactionModal {
|
||||||
let label = format!("{} {}", CUBE, t!("network_mining.address"));
|
let label = format!("{} {}", CUBE, t!("network_mining.address"));
|
||||||
Self::info_item_ui(ui, rec.to_string(), label, true, cb);
|
Self::info_item_ui(ui, rec.to_string(), label, true, cb);
|
||||||
}
|
}
|
||||||
// Show block height.
|
|
||||||
if let Some(height) = tx.height {
|
|
||||||
if height != 0 {
|
|
||||||
let label = format!("{} {}", CUBE, t!("network_node.block"));
|
|
||||||
Self::info_item_ui(ui, height.to_string(), label, true, cb);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show Slatepack message interaction.
|
// Show Slatepack message interaction.
|
||||||
|
|
Loading…
Reference in a new issue