notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 3eb9e30e8f664b4f617315568bbc6f0c3d73aeca
parent 514e5748b8309a17070ae6d8a73e84e6219f5f76
Author: William Casarin <jb55@jb55.com>
Date:   Thu,  1 May 2025 19:54:02 -0700

dave: fix sidebar click

Fixes: #837
Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mcrates/notedeck_chrome/src/chrome.rs | 3++-
Mcrates/notedeck_dave/src/avatar.rs | 4+++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/crates/notedeck_chrome/src/chrome.rs b/crates/notedeck_chrome/src/chrome.rs @@ -279,7 +279,8 @@ impl Chrome { } if ui.add(expand_side_panel_button()).clicked() { - self.active = (self.active + 1) % (self.apps.len() as i32); + //self.active = (self.active + 1) % (self.apps.len() as i32); + // TODO: collapse sidebar ? } ui.add_space(4.0); diff --git a/crates/notedeck_dave/src/avatar.rs b/crates/notedeck_dave/src/avatar.rs @@ -316,7 +316,7 @@ impl DaveAvatar { } pub fn render(&mut self, rect: Rect, ui: &mut egui::Ui) -> Response { - let response = ui.allocate_rect(rect, egui::Sense::drag()); + let response = ui.allocate_rect(rect, egui::Sense::CLICK | egui::Sense::DRAG); // Update rotation based on drag or animation if response.dragged() { @@ -330,6 +330,8 @@ impl DaveAvatar { // Apply rotations (order matters) self.rotation = y_rotation.multiply(&x_rotation).multiply(&self.rotation); + } else if response.clicked() { + self.random_nudge(); } else { // Continuous rotation - reduced speed and simplified axis let friction = 0.95;