From 589d6ecbbc60c5affbafdf11f295ef19ba3c20ec Mon Sep 17 00:00:00 2001 From: ardocrat Date: Fri, 19 Apr 2024 04:20:25 +0300 Subject: [PATCH] ui: wallet creation bottom panel fix, long press or right click as click --- src/gui/views/views.rs | 2 +- src/gui/views/wallets/creation/creation.rs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/views/views.rs b/src/gui/views/views.rs index 1a3c5cf..a1f0f6f 100644 --- a/src/gui/views/views.rs +++ b/src/gui/views/views.rs @@ -136,7 +136,7 @@ impl View { if drag_resp.dragged() && !ui.rect_contains_pointer(drag_resp.rect) { ui.input_mut(|i| i.pointer = PointerState::default()); } - if drag_resp.drag_released() || drag_resp.clicked() { + if drag_resp.drag_stopped() || drag_resp.clicked() || drag_resp.secondary_clicked() { return true; } false diff --git a/src/gui/views/wallets/creation/creation.rs b/src/gui/views/wallets/creation/creation.rs index 040fb07..3d73df6 100644 --- a/src/gui/views/wallets/creation/creation.rs +++ b/src/gui/views/wallets/creation/creation.rs @@ -75,8 +75,8 @@ impl WalletCreation { stroke: View::DEFAULT_STROKE, fill: Colors::FILL, inner_margin: Margin { - left: View::far_left_inset_margin(ui) + 4.0, - right: View::get_right_inset() + 4.0, + left: View::far_left_inset_margin(ui) + 8.0, + right: View::get_right_inset() + 8.0, top: 4.0, bottom: View::get_bottom_inset(), }, @@ -182,7 +182,7 @@ impl WalletCreation { ui.add_space(4.0); } else { // Setup spacing between buttons. - ui.spacing_mut().item_spacing = egui::Vec2::new(6.0, 0.0); + ui.spacing_mut().item_spacing = egui::Vec2::new(8.0, 0.0); ui.columns(2, |columns| { // Show copy or paste button for mnemonic phrase step. @@ -197,6 +197,7 @@ impl WalletCreation { }); } }); + ui.add_space(4.0); } } else { if step_available {