From e997f1bf689c887954898b8ba254cd167f66d394 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Wed, 23 Jul 2025 11:39:02 -0700 Subject: [PATCH] ui/note: make buttons larger Changelog-Changed: Make buttons larger Fixes: https://github.com/damus-io/notedeck/issues/879 Signed-off-by: William Casarin --- crates/notedeck_ui/src/anim.rs | 7 ++++++- crates/notedeck_ui/src/note/mod.rs | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/crates/notedeck_ui/src/anim.rs b/crates/notedeck_ui/src/anim.rs index e5a348ae..e344803c 100644 --- a/crates/notedeck_ui/src/anim.rs +++ b/crates/notedeck_ui/src/anim.rs @@ -20,8 +20,13 @@ pub fn hover_expand( (rect, size, response) } +#[inline] +pub fn hover_small_size() -> f32 { + 14.0 +} + pub fn hover_expand_small(ui: &mut egui::Ui, id: egui::Id) -> (egui::Rect, f32, egui::Response) { - let size = 10.0; + let size = hover_small_size(); let expand_size = 5.0; let anim_speed = 0.05; diff --git a/crates/notedeck_ui/src/note/mod.rs b/crates/notedeck_ui/src/note/mod.rs index 476639f1..7a4467ff 100644 --- a/crates/notedeck_ui/src/note/mod.rs +++ b/crates/notedeck_ui/src/note/mod.rs @@ -782,8 +782,12 @@ fn render_note_actionbar( i18n: &mut Localization, ) -> egui::InnerResponse> { ui.horizontal(|ui| { + ui.set_min_height(26.0); + ui.spacing_mut().item_spacing.x = 24.0; + let reply_resp = reply_button(ui, i18n, note_key).on_hover_cursor(egui::CursorIcon::PointingHand); + let quote_resp = quote_repost_button(ui, i18n, note_key).on_hover_cursor(egui::CursorIcon::PointingHand); @@ -899,7 +903,7 @@ fn quote_repost_button( i18n: &mut Localization, note_key: NoteKey, ) -> egui::Response { - let size = 14.0; + let size = crate::anim::hover_small_size() + 4.0; let expand_size = 5.0; let anim_speed = 0.05; let id = ui.id().with(("repost_anim", note_key));