ui: fix qr paddings, wallets, connections strokes
This commit is contained in:
parent
e099b5da8e
commit
530f402d11
7 changed files with 17 additions and 17 deletions
|
@ -102,11 +102,7 @@ impl NetworkContent {
|
|||
egui::CentralPanel::default()
|
||||
.frame(egui::Frame {
|
||||
stroke: if show_connections {
|
||||
if Root::is_dual_panel_mode(ui) {
|
||||
View::default_stroke()
|
||||
} else {
|
||||
Stroke::NONE
|
||||
}
|
||||
View::item_stroke()
|
||||
} else {
|
||||
Stroke::NONE
|
||||
},
|
||||
|
|
|
@ -164,6 +164,7 @@ impl QrCodeContent {
|
|||
if !sharing {
|
||||
// Show button to share QR.
|
||||
let share_txt = format!("{} {}", IMAGES_SQUARE, t!("share"));
|
||||
ui.add_space(4.0);
|
||||
View::action_button(ui, share_txt, || {
|
||||
{
|
||||
let mut w_state = self.qr_image_state.write();
|
||||
|
|
|
@ -199,7 +199,7 @@ impl WalletsContent {
|
|||
if !list_hidden {
|
||||
egui::CentralPanel::default()
|
||||
.frame(egui::Frame {
|
||||
stroke: View::default_stroke(),
|
||||
stroke: View::item_stroke(),
|
||||
fill: Colors::fill_deep(),
|
||||
inner_margin: Margin {
|
||||
left: if list_hidden {
|
||||
|
@ -340,6 +340,9 @@ impl WalletsContent {
|
|||
.auto_shrink([false; 2])
|
||||
.show(ui, |ui| {
|
||||
ui.vertical_centered(|ui| {
|
||||
if !dual_panel {
|
||||
ui.add_space(1.0);
|
||||
}
|
||||
// Setup wallet list width.
|
||||
let max_width = if !dual_panel {
|
||||
Root::SIDE_PANEL_WIDTH * 1.3
|
||||
|
@ -350,9 +353,6 @@ impl WalletsContent {
|
|||
let mut list = self.wallets.list().clone();
|
||||
// Remove deleted wallet from the list.
|
||||
list.retain(|w| !w.is_deleted());
|
||||
if !dual_panel {
|
||||
ui.add_space(1.0);
|
||||
}
|
||||
for wallet in &list {
|
||||
// Check if wallet reopen is needed.
|
||||
if !wallet.is_open() && wallet.reopen_needed() {
|
||||
|
|
|
@ -81,6 +81,8 @@ impl WalletContent {
|
|||
// Show modal content for this ui container.
|
||||
self.modal_content_ui(ui, wallet, cb);
|
||||
|
||||
let dual_panel = Root::is_dual_panel_mode(ui);
|
||||
|
||||
let data = wallet.get_data();
|
||||
let data_empty = data.is_none();
|
||||
|
||||
|
@ -102,7 +104,7 @@ impl WalletContent {
|
|||
left: 0.0,
|
||||
right: 0.0,
|
||||
top: 0.0,
|
||||
bottom: if !Root::is_dual_panel_mode(ui) {
|
||||
bottom: if !dual_panel {
|
||||
0.0
|
||||
} else {
|
||||
-1.0
|
||||
|
@ -112,6 +114,9 @@ impl WalletContent {
|
|||
})
|
||||
.show_animated_inside(ui, show_balance, |ui| {
|
||||
ui.vertical_centered(|ui| {
|
||||
if !dual_panel {
|
||||
ui.add_space(1.0);
|
||||
}
|
||||
// Draw account info.
|
||||
View::max_width_ui(ui, Root::SIDE_PANEL_WIDTH * 1.3, |ui| {
|
||||
self.account_ui(ui, wallet, data.unwrap(), cb);
|
||||
|
@ -143,6 +148,7 @@ impl WalletContent {
|
|||
// Show tab content panel.
|
||||
egui::CentralPanel::default()
|
||||
.frame(egui::Frame {
|
||||
stroke: View::item_stroke(),
|
||||
fill: Colors::white_or_black(false),
|
||||
..Default::default()
|
||||
})
|
||||
|
@ -396,7 +402,7 @@ impl WalletContent {
|
|||
});
|
||||
ui.add_space(2.0);
|
||||
View::horizontal_line(ui, Colors::item_stroke());
|
||||
ui.add_space(6.0);
|
||||
ui.add_space(10.0);
|
||||
|
||||
// Show copy button.
|
||||
ui.vertical_centered(|ui| {
|
||||
|
@ -407,7 +413,7 @@ impl WalletContent {
|
|||
modal.close();
|
||||
});
|
||||
});
|
||||
ui.add_space(6.0);
|
||||
ui.add_space(10.0);
|
||||
View::horizontal_line(ui, Colors::item_stroke());
|
||||
ui.add_space(6.0);
|
||||
} else if let Some(result) = self.camera_content.qr_scan_result() {
|
||||
|
|
|
@ -129,7 +129,6 @@ impl WalletTab for WalletMessages {
|
|||
|
||||
egui::CentralPanel::default()
|
||||
.frame(egui::Frame {
|
||||
stroke: View::item_stroke(),
|
||||
fill: Colors::white_or_black(false),
|
||||
inner_margin: Margin {
|
||||
left: View::far_left_inset_margin(ui) + 4.0,
|
||||
|
|
|
@ -90,7 +90,6 @@ impl WalletTab for WalletTransport {
|
|||
// Show transport content panel.
|
||||
egui::CentralPanel::default()
|
||||
.frame(egui::Frame {
|
||||
stroke: View::item_stroke(),
|
||||
fill: Colors::white_or_black(false),
|
||||
inner_margin: Margin {
|
||||
left: View::far_left_inset_margin(ui) + 4.0,
|
||||
|
|
|
@ -106,10 +106,9 @@ impl WalletTab for WalletTransactions {
|
|||
// Show modal content for this ui container.
|
||||
self.modal_content_ui(ui, wallet, cb);
|
||||
|
||||
// Show wallet transactions panel.
|
||||
// Show wallet transactions content.
|
||||
egui::CentralPanel::default()
|
||||
.frame(egui::Frame {
|
||||
stroke: View::item_stroke(),
|
||||
fill: Colors::button(),
|
||||
inner_margin: Margin {
|
||||
left: View::far_left_inset_margin(ui) + 4.0,
|
||||
|
|
Loading…
Reference in a new issue