summaryrefslogtreecommitdiff
path: root/source/ui/ListView.mc
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-10-25 13:13:39 +0100
committercirakg <cirakg@cirakg.xyz>2026-10-25 13:13:39 +0100
commit404b505a41362f340e79374ee3ad4dbd468da3e4 (patch)
tree883d4f1ecda6c30ce890b1aa4026c8ba1726804e /source/ui/ListView.mc
parent096b5a4d17c85fa5f87db3e72364e9c3506d1e64 (diff)
fix(ui): vertical swipes and drags scroll the list and text screens
The Forerunner 70 sends no page behaviour for a swipe on a custom view, so the list and info screens only scrolled with the buttons. Swipes and drags now scroll them directly; one gesture scrolls once even when the device also sends the page behaviour, and a drag's release opens no row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'source/ui/ListView.mc')
-rw-r--r--source/ui/ListView.mc6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/ui/ListView.mc b/source/ui/ListView.mc
index 94b8c99..de73cce 100644
--- a/source/ui/ListView.mc
+++ b/source/ui/ListView.mc
@@ -82,9 +82,15 @@ class ListView extends WatchUi.View {
return;
}
focus = ((focus + delta) % n + n) % n;
+ Diag.data("list_move", "focus=" + focus);
WatchUi.requestUpdate();
}
+ // The height of a row as last drawn (for drags).
+ function rowHeight() as Number {
+ return _rowHeight;
+ }
+
function focusedId() as String? {
return focus < _ids.size() ? _ids[focus] : null;
}