diff --git a/core/resources/i18n/i18n.json b/core/resources/i18n/i18n.json index 108e09c..3c2de24 100644 --- a/core/resources/i18n/i18n.json +++ b/core/resources/i18n/i18n.json @@ -3220,6 +3220,7 @@ "Faucet": "Faucet", "Fee Rate Estimates": "Fee Rate Estimates", "File Handles": "File Handles", + "File contents": "File contents", "Filename:": "Filename:", "Final Amount:": "Final Amount:", "For decrypting uploaded file please enter wallet secret.": "For decrypting uploaded file please enter wallet secret.", @@ -3237,6 +3238,7 @@ "Import Existing Private Key": "Import Existing Private Key", "Import existing": "Import existing", "Import existing file": "Import existing file", + "Importing Legacy Wallet": "Importing Legacy Wallet", "Importing Wallet": "Importing Wallet", "Importing Wallet File": "Importing Wallet File", "Inbound": "Inbound", diff --git a/core/src/egui/selection_panels.rs b/core/src/egui/selection_panels.rs index c55e323..16d6e9b 100644 --- a/core/src/egui/selection_panels.rs +++ b/core/src/egui/selection_panels.rs @@ -150,19 +150,24 @@ impl SelectionPanel { let _res = add_contents(&mut prepared.content_ui); *min_height = min_height.max(prepared.content_ui.min_rect().height()); prepared.content_ui.set_min_height(*min_height); - let rect = prepared.content_ui.min_rect() + prepared.frame.inner_margin; - if !selected && ui.allocate_rect(rect, Sense::hover()).hovered() { - //prepared.frame = prepared.frame.stroke(hover_stroke); - prepared.frame = prepared.frame.fill(selected_bg).stroke(hover_stroke); + let mut response = prepared.allocate_space(ui).interact(Sense::click()); + + if !selected && response.hovered() { + prepared.frame = prepared.frame.stroke(hover_stroke); + } + + if response.is_pointer_button_down_on() { + let visuals = ui.style().interact(&response); + prepared.frame = prepared.frame.fill(selected_bg).stroke(visuals.bg_stroke); } - let res = prepared.end(ui); + prepared.paint(ui); - let mut response = res.interact(Sense::click()); if response.clicked() && *current_value != self.value { *current_value = self.value; response.mark_changed(); } + response } } @@ -340,7 +345,7 @@ impl SelectionPanels { }; ui.indent_with_size("selection-panels", indent, Box::new(add_contents)) - .response + .inner // response |= ui // .vertical_centered(|ui| (self.build_footer)(ui, current_value)) // .response; diff --git a/core/src/modules/account_manager/estimator.rs b/core/src/modules/account_manager/estimator.rs index 47e5513..d247e2a 100644 --- a/core/src/modules/account_manager/estimator.rs +++ b/core/src/modules/account_manager/estimator.rs @@ -129,10 +129,7 @@ impl<'context> Estimator<'context> { }); } - // if fee_selection.render(ui, &mut self.context.fee_mode).clicked() { - let mode = self.context.fee_mode; - fee_selection.render(ui, &mut self.context.fee_mode); - if mode != self.context.fee_mode { + if fee_selection.render(ui, &mut self.context.fee_mode).clicked() { let bucket = self.context.fee_mode.bucket(); let priority_feerate = (bucket.feerate - 1.0).max(0.0); let total_fees_sompi = (priority_feerate * actual_estimate.aggregate_mass as f64) as u64;