Files
sunnypilot/system/ui
Shane Smiskol bbed1a2551 scroll: use iOS-style weighted velocity averaging for fling (#37659)
* scroll: use iOS-style weighted velocity averaging for fling

Weight older velocity samples more heavily on finger release to produce
more consistent fling velocities. The last touch samples before lift are
noisy (finger decelerating, rotating, jittering), so we trust the earlier
steadier samples more: 60% oldest, 35% middle, 5% newest.

Reverse-engineered from iOS UIScrollView by the Flutter team.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Update system/ui/lib/application.py

* Apply suggestions from code review

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 02:55:56 -07:00
..
2026-03-11 18:58:51 -07:00
2026-03-09 18:43:42 -07:00
2025-11-18 22:27:45 -08:00
2025-11-18 22:27:45 -08:00
2025-11-18 22:27:45 -08:00
2025-11-18 22:27:45 -08:00
2026-03-07 00:14:01 -08:00
2026-03-11 18:58:51 -07:00
2025-11-18 22:27:45 -08:00

ui

The user interfaces here are built with raylib.

Quick start:

Style guide:

  • All graphical elements should subclass Widget.
    • Prefer a stateful widget over a function for easy migration from QT
  • All internal class variables and functions should be prefixed with _