From 63531079b39432f733c8fd4da75484d308f74865 Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Fri, 20 Jan 2023 08:06:21 +1300 Subject: [PATCH] Add some UI hovers --- src/ui/feed.rs | 7 ++++++- src/ui/mod.rs | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ui/feed.rs b/src/ui/feed.rs index ef75efcf..22a33d9a 100644 --- a/src/ui/feed.rs +++ b/src/ui/feed.rs @@ -518,7 +518,10 @@ fn render_post_actual( // Under row if !as_reply_to { ui.horizontal(|ui| { - if ui.add(CopyButton {}).clicked() { + if ui.add(CopyButton {}) + .on_hover_text("Copy Contents") + .clicked() + { ui.output().copied_text = event.content.clone(); } @@ -527,6 +530,7 @@ fn render_post_actual( // Button to quote note if ui .add(Label::new(RichText::new("ยป").size(18.0)).sense(Sense::click())) + .on_hover_text("Quote") .clicked() { if !app.draft.ends_with(' ') && !app.draft.is_empty() { @@ -541,6 +545,7 @@ fn render_post_actual( // Button to reply if ui .add(Label::new(RichText::new("๐Ÿ’ฌ").size(18.0)).sense(Sense::click())) + .on_hover_text("Reply") .clicked() { app.replying_to = Some(event.id); diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 02eee995..d7c43a2c 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -400,7 +400,10 @@ impl GossipUi { } ui.label(RichText::new("๐Ÿ”‘").text_style(TextStyle::Small).weak()); - if ui.add(CopyButton {}).clicked() { + if ui.add(CopyButton {}) + .on_hover_text("Copy Public Key") + .clicked() + { ui.output().copied_text = person.pubkey.0.to_owned(); } }