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
This commit is contained in:
@@ -54,8 +54,11 @@ pub(crate) fn image_carousel(
|
|||||||
};
|
};
|
||||||
let mut action = None;
|
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| {
|
ui.add_sized([width, height], |ui: &mut egui::Ui| {
|
||||||
egui::ScrollArea::horizontal()
|
egui::ScrollArea::horizontal()
|
||||||
|
.drag_to_scroll(false)
|
||||||
.id_salt(carousel_id)
|
.id_salt(carousel_id)
|
||||||
.show(ui, |ui| {
|
.show(ui, |ui| {
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
|
|||||||
Reference in New Issue
Block a user