Add a curated theme system for "modern" style widgets, inspired by Tesserae
Frame.theme (7 presets in app/theme_tokens.py) drives font family, corner radius, drop shadow, and an accent hue for every modern-style widget's header/accent region. Rich accent colors (not just the 6 flat panel inks) are approximated via denser Bayer stippling confined to just that region (html_render.ordered_dither_regions), so icon/text content elsewhere stays exactly as crisp as it is today -- verified directly against real Chromium renders, both in unit tests and via run-server. "classic" is a byte-identical no-visual-change default: weather's header keeps its original fixed blue gradient, tasks/calendar keep their flat THEME_* ink. Themes are purely stylistic -- battery's charge-level color, calendar/ tasks' per-owner event chips, and text's own per-widget font choice are never touched.
This commit is contained in:
@@ -186,6 +186,11 @@ class Frame(Base):
|
||||
# for real photographs. NULL/1.0 = same defaults as the main fields.
|
||||
photo_palette_rgb: Mapped[list | None] = mapped_column(JSON, nullable=True, default=None)
|
||||
photo_dither_strength: Mapped[float] = mapped_column(Float, default=1.0)
|
||||
# Curated visual theme for "modern" (HTML/CSS) style widgets -- see
|
||||
# theme_tokens.THEMES. Frame-level (like palette_rgb/dither_strength
|
||||
# above), not per-widget, since a theme is "how this frame looks."
|
||||
# Widgets rendered in classic (PIL) style ignore this entirely.
|
||||
theme: Mapped[str] = mapped_column(String, default="classic")
|
||||
|
||||
# -- calendar mode (see calendar_feed.py, calendar_render.py,
|
||||
# routers/device.py's RENDERERS["calendar"]) --
|
||||
|
||||
Reference in New Issue
Block a user