mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-22 14:32:12 +08:00
1d9bda65fe
* param to control stock vs sp ui * init styles * SP Toggles * Lint * optimizations * sp raylib preview * fix callback * fix ui preview * sunnylink state * introducing ui_state_sp for py * poll from ui_state_sp * cloudlog & ruff * param to control stock vs sp ui * better * better padding * this * listitem -> listitemsp * add show_description method * remove padding from line separator. like, WHY? 😩😩 * ui: `GuiApplicationExt` * add to readme * use gui_app.sunnypilot_ui() * use gui_app.sunnypilot_ui() * fetch only when connected to network * sponsor & pairing qr * init panel elements * backup & restore * fruit loops * update * enable, disable, enable, disable * handle layout updates * not needed * change it up * better * scroller -> scroller_tici * optimizations * remove Params * fix button disablement * ui_state_sp changes * keep enabled * add header text * dad jokes? * no * lint? Lint! * final touches * add sp font * use sp font * some * ui: add right-aligned value display support in `ListItem` (in another pr) * display sunnylink device id * display sunnylink device id and sponsor tiers * ui: add right-aligned value display support in `ListItemSP` * lint * styles * lint * ui: introduce customizable value colors for `ButtonActionSP` and `ListViewSP` * support * convert to str * disable if paired * colored sponsors * hide and disable pairing button if paired * texts * ui: sunnypilot sponsor tier color mapping * lint * dongle id for ui preview --------- Co-authored-by: Jason Wen <haibin.wen3@gmail.com> Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
ui
The user interfaces here are built with raylib.
Quick start:
- set
BIG=1to run the comma 3X UI (comma four UI runs by default) - set
SHOW_FPS=1to show the FPS - set
STRICT_MODE=1to kill the app if it drops too much below 60fps - set
SCALE=1.5to scale the entire UI by 1.5x - set
BURN_IN=1to get a burn-in heatmap version of the UI - set
GRID=50to show a 50-pixel alignment grid overlay - set
MAGIC_DEBUG=1to show every dropped frames (only on device) - set
SUNNYPILOT_UI=0to run the stock UI instead of the sunnypilot UI - https://www.raylib.com/cheatsheet/cheatsheet.html
- https://electronstudio.github.io/raylib-python-cffi/README.html#quickstart
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
_