feat(midiviz): a sun theme, a menu, and a tray it can hide into
PLN: "midimon unusable in the sun in light mode :') can we have a basic menu for midimon, maybe a tray presence when runnig, with scaling, theme, etc options ? to help sets in all context, robust, antifragile". Colours leave the paint loop and become data: three themes resolved once per change, so a frame still constructs no QColor and the 30/5 fps split is intact. The cut that made it work is INK versus SURFACE — recency (digits, bars, pens) against cell bodies, column glow and gutter — because the docstring's own invariant is that a mapped-but-idle cell must never read as a hardware fault. On dark that is a glow above black; on light and sun it is a wash below the page. A test asserts the floor tint differs from the page on all three. `sun` needed two passes and only a screenshot said so: the first render climbed to a saturated mid-tone panel and the digits lost the fight against it — light with fatter bars, not a sun theme. Flattened tint, near-black ink at every decay level, and a bold face, which outdoors is the cheapest contrast there is. The decayed state was shot on purpose, since "no subtle dim states" is exactly about the moment after a movement ends. Menu and tray are one QMenu, and every entry calls the same method the key does — no second code path, and no setShortcut, which would have taken the keys off keyPressEvent and out of the selftest's reach. Tray guarded on isSystemTrayAvailable and silently absent otherwise; a hidden window drops to idle fps and X/q/Quit still really exit. Config at $XDG_CONFIG_HOME/parvagues/midiviz.json, temp-file plus os.replace, and load cannot raise: missing, corrupt, not-a-dict, unknown-theme, NaN scale and unwritable are each exercised. A monitor that dies on a bad config file is worse than one with no config, and this one is meant for the middle of a set. Verified: bridge tests 105 -> 121 passing (the single failure is the inherited test_gearbox dash case, identical before and after); selftest PASS on all three themes; and dark proven pixel-identical to HEAD at four scales by rendering both versions side by side. NOT verified, and not to be claimed: the tray on a real desktop. Headless has no status area, so only the degrade path was proven. One known follow-up — a window hidden to the tray is still alive, so the hub's focus_window does nothing for it and the tray is the only recall path.
Showing
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment