Skip to content

Home and apps draw Material icons from iconkit, not lv.SYMBOL - #66

Merged
bdbarnett merged 12 commits into
mainfrom
iconkit
Nov 12, 2026
Merged

bdbarnett merged 12 commits into
mainfrom
iconkit

Conversation

@bdbarnett

@bdbarnett bdbarnett commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Home, the round Home button and every app now draw Material Design icons from iconkit instead of lv.SYMBOL. iconkit is a package of the pydevices repository (omnipython-iconkit, PyDevices/pydevices#531), so this repository adds no package for it and lib/ stays the one omnipython-applibs package. Home and appkit import it the same way as before.

Each app's app.json has a new required field, "icon", a Material name from iconkit's 48 px set, replacing "symbol". An app with a tile and no icon, or one iconkit doesn't have, is an error with the app and icon named: when the index is built, and when Home starts. There is no default icon. "tile": false apps need none. The icon docs and contact sheets are on iconkit's side: README and icons page.

App Icon
camera photo_camera
card speaker
cast cast
clock schedule
detect image_search
medialink_baby_monitor child_care
medialink_doorbell doorbell
medialink_hands_free phone_in_talk
medialink_surveillance_camera camera_outdoor
medialink_video_doorbell videocam
medialink_videophone video_call
medialink_walkie_talkie record_voice_over
midiengine library_music
mp3 audio_file
roku settings_remote
security security
spotify queue_music
stompbox tune
synthstation piano
system settings
wake mic
weather wb_sunny

appkit's manifest no longer includes iconkit: freeze it beside appkit, as you do pydevices. The appkit tests take iconkit from packages/iconkit/lib in the pydevices checkout (or ICONKIT_LIB), and the index check raises with the fix when iconkit isn't importable. This pull request's CI needs pydevices main to hold packages/iconkit, so it is green only after pydevices#531 merges.

I ran Home on unix MicroPython headless at 800x480 (all four pages) and as a 240x240 and 360x360 round screen, and looked at the frames, before iconkit moved. After the move I ran the appkit index and script tests on CPython against the new location, and confirmed Home and appkit import on unix MicroPython with iconkit taken from the pydevices folder. I did not re-render the Home frames after the move, did not run the appkit MicroPython contract checks (this machine's interpreter has no frozen appkit and they fail the same way without my change), and did not run it on a board. Buttons inside apps still use lv.SYMBOL.

@bdbarnett

Copy link
Copy Markdown
Contributor Author

RAM measured on unix MicroPython 1.29 with pygraphics (and its new blit_alpha) built in, running the same binary with iconkit frozen and with iconkit loaded from the filesystem. Heap figures are after gc.collect().

frozen from the filesystem
import both sets (24 px and 48 px) 1,824 bytes 152,448 bytes
hold 50 mask() results 5,792 bytes (116 each: the memoryview slice and its tuple) 5,792 bytes
draw 50 icons into a FrameBuffer with iconkit.gfx.draw 512 bytes 1,632 bytes

Frozen, the icon pixels stay in flash: no icon's 576 bytes are ever copied to the heap.

appkit's Home and apps still import iconkit the same way, but the package now
lives in PyDevices/pydevices at packages/iconkit (omnipython-iconkit), beside
pdwidgets and palettes, so that apps/lib stays the one omnipython-applibs
package and pdwidgets and appkit can both depend on one small package.

Removed here: lib/iconkit, its generator and contact-sheet tools, its tests and
its icons page; appkit's manifest no longer includes it. The appkit tests find
iconkit at packages/iconkit/lib in the pydevices checkout PYDEVICES_LIB belongs
to (or ICONKIT_LIB). The index check raises with the fix when iconkit isn't
importable. The README, appkit README, how-it-works and app.json icon docs link
to the package's README and icons page.

Ran: the appkit index and script tests on CPython against the new location,
including a new one for the missing-iconkit message; Home and appkit import on
unix MicroPython with iconkit taken from packages/iconkit/lib.
@bdbarnett bdbarnett changed the title iconkit: Material icons that stay in flash, for LVGL and pygraphics Home and apps draw Material icons from iconkit, not lv.SYMBOL Nov 12, 2026
…on check

appkit's manifest.py no longer assumes iconkit sits beside it. It freezes iconkit
from the folder iconkit= names (pydevices' packages/iconkit, or <tree>/iconkit in
an omnipython-lib tree), else from $PYDEVICES_LIBRARY, and with apps= it puts that
source on the host's import path while the index checks each app's icon. With
neither it stops and says to pass iconkit= or set PYDEVICES_LIBRARY, so a build
never freezes a Home that cannot import.

Ran: the manifest tests under MicroPython's own manifest reader in an isolated
interpreter (they fail on the previous manifest with the host ImportError and pass
now, including the two missing-iconkit messages), and a unix MicroPython build that
freezes appkit with apps= (Home, Clock, Weather) from an omnipython-lib tree.
@bdbarnett
bdbarnett merged commit 7584262 into main Nov 12, 2026
6 checks passed
@bdbarnett
bdbarnett deleted the iconkit branch November 12, 2026 05:11
@bdbarnett
bdbarnett restored the iconkit branch November 12, 2026 05:11
@bdbarnett
bdbarnett deleted the iconkit branch November 12, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant