Files
Classroom_Desktop/lib/classroom_style.py
T
ekklesiaandClaude Opus 5 d5cc6e463f fix: keep the DVD player whole
Removing gtk-layer-shell from the dependencies broke classroom-dvd on the
first run, and deleting the dock's stylesheet took the DVD control bar's
styling with it. Both go back: the template under a name that says what
still uses it, and the dependency with a line in the package description
explaining that it is there for the disc player and not for a dock.

A probe overlay confirms gtk-layer-shell works under KWin, so the loading
cover survives the move. The focus helper still speaks sway, which is
written down rather than papered over.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-10 09:10:08 -05:00

37 lines
942 B
Python

"""The classroom stylesheet, resolved at the room's UI scale.
The dock and the DVD control bar share this so they cannot drift apart:
one template, one set of measurements, one look.
"""
from pathlib import Path
from classroom_config import scaled
TEMPLATE = Path("/etc/ekklesia-classroom/overlay/style.css.in")
# Every measurement in the template, at UI_SCALE=1.0.
MEASUREMENTS = {
"dock-radius": 24,
"dock-padding-v": 8,
"dock-padding-h": 10,
"button-radius": 16,
"button-padding": 6,
"button-size": 44,
"button-spinner": 38,
"clock-radius": 16,
"clock-padding-v": 7,
"clock-padding-h": 12,
"clock-font": 17,
}
def render(scale, template=None):
"""Resolve the measurement tokens in the stylesheet template."""
css = (template or TEMPLATE).read_text()
for token, value in MEASUREMENTS.items():
css = css.replace(f"@{token}@", str(scaled(value, scale)))
return css