ui: wallet creation bottom panel fix, long press or right click as click

This commit is contained in:
ardocrat 2024-04-19 04:20:25 +03:00
parent c668511bb6
commit 589d6ecbbc
2 changed files with 5 additions and 4 deletions

View file

@ -136,7 +136,7 @@ impl View {
if drag_resp.dragged() && !ui.rect_contains_pointer(drag_resp.rect) { if drag_resp.dragged() && !ui.rect_contains_pointer(drag_resp.rect) {
ui.input_mut(|i| i.pointer = PointerState::default()); 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; return true;
} }
false false

View file

@ -75,8 +75,8 @@ impl WalletCreation {
stroke: View::DEFAULT_STROKE, stroke: View::DEFAULT_STROKE,
fill: Colors::FILL, fill: Colors::FILL,
inner_margin: Margin { inner_margin: Margin {
left: View::far_left_inset_margin(ui) + 4.0, left: View::far_left_inset_margin(ui) + 8.0,
right: View::get_right_inset() + 4.0, right: View::get_right_inset() + 8.0,
top: 4.0, top: 4.0,
bottom: View::get_bottom_inset(), bottom: View::get_bottom_inset(),
}, },
@ -182,7 +182,7 @@ impl WalletCreation {
ui.add_space(4.0); ui.add_space(4.0);
} else { } else {
// Setup spacing between buttons. // 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| { ui.columns(2, |columns| {
// Show copy or paste button for mnemonic phrase step. // Show copy or paste button for mnemonic phrase step.
@ -197,6 +197,7 @@ impl WalletCreation {
}); });
} }
}); });
ui.add_space(4.0);
} }
} else { } else {
if step_available { if step_available {