commit ca988165cc5cdbb0ab23d930b289bd9c85b82793 parent 8025be823a8fc7099bb47096271dd7377f19cf28 Author: William Casarin <jb55@jb55.com> Date: Thu, 19 Dec 2024 09:08:52 -0800 column: show pointer button on hover Diffstat:
M | crates/notedeck_columns/src/ui/column/header.rs | | | 10 | +++++++--- |
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/crates/notedeck_columns/src/ui/column/header.rs b/crates/notedeck_columns/src/ui/column/header.rs @@ -67,9 +67,13 @@ impl<'a> NavTitle<'a> { let back_button_resp = prev(self.routes).map(|r| self.back_button(ui, r, egui::Vec2::new(chev_x, 15.0))); - // add some space where chevron would have been. this makes the ui - // less bumpy when navigating - if back_button_resp.is_none() { + if let Some(back_resp) = &back_button_resp { + if back_resp.hovered() || back_resp.clicked() { + ui::show_pointer(ui); + } + } else { + // add some space where chevron would have been. this makes the ui + // less bumpy when navigating ui.add_space(chev_x + item_spacing); }