commit 5ef77efebb95d9bc1433cb85e04f3614e89c1f08
parent 81a9ddbebc2bcb8221b5264d3e06395fa6ef52ab
Author: William Casarin <jb55@jb55.com>
Date: Tue, 3 Jun 2025 08:38:03 -0700
scroll: simple fix
Instead of a complicated min scroll distance implementation,
we simply disable drag to scroll on carousel to fix vertical
scrolling on android
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/crates/notedeck_ui/src/note/media.rs b/crates/notedeck_ui/src/note/media.rs
@@ -54,8 +54,11 @@ pub(crate) fn image_carousel(
};
let mut action = None;
+ //let has_touch_screen = ui.ctx().input(|i| i.has_touch_screen());
+
ui.add_sized([width, height], |ui: &mut egui::Ui| {
egui::ScrollArea::horizontal()
+ .drag_to_scroll(false)
.id_salt(carousel_id)
.show(ui, |ui| {
ui.horizontal(|ui| {