From 2b7d66e7ae585fd092ece2d3bc1081fa8c193124 Mon Sep 17 00:00:00 2001 From: kernelkind Date: Mon, 3 Feb 2025 14:31:51 -0500 Subject: [PATCH] add deck icon hover tooltip with deck name closes: https://github.com/damus-io/notedeck/issues/691 Signed-off-by: kernelkind --- crates/notedeck_columns/src/ui/side_panel.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/crates/notedeck_columns/src/ui/side_panel.rs b/crates/notedeck_columns/src/ui/side_panel.rs index aa67bed7..b66e4721 100644 --- a/crates/notedeck_columns/src/ui/side_panel.rs +++ b/crates/notedeck_columns/src/ui/side_panel.rs @@ -610,13 +610,15 @@ fn show_decks<'a>( let mut clicked_index = None; for (index, deck) in cur_decks.decks().iter().enumerate() { let highlight = index == active_index; - let deck_icon_resp = ui.add(deck_icon( - account_id.with(index), - Some(deck.icon), - DECK_ICON_SIZE, - 40.0, - highlight, - )); + let deck_icon_resp = ui + .add(deck_icon( + account_id.with(index), + Some(deck.icon), + DECK_ICON_SIZE, + 40.0, + highlight, + )) + .on_hover_text_at_pointer(&deck.name); if deck_icon_resp.clicked() || deck_icon_resp.secondary_clicked() { clicked_index = Some(index); }