Skip to content

Commit

Permalink
column: show pointer button on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
jb55 committed Dec 19, 2024
1 parent 8025be8 commit ca98816
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/notedeck_columns/src/ui/column/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit ca98816

Please sign in to comment.