feat: a lesson in Wonder Ink is the size the browser shows it, and zooms

Teachers found lessons in Wonder Ink too small next to the ordinary
browser. Measured by asking each page for devicePixelRatio: Wonder Ink
follows the display scale exactly (dpr 1.5 at 150%), and Chrome is
scaled TWICE (dpr 2.25) — under Plasma it follows the compositor itself
and classroom-browser also forces UI_SCALE, a flag from the sway session.

The browser is left as it is. Wonder Ink's pages start at zoom =
UI_SCALE, the room's own number (1.0 at 100%), and measured afterwards
match the browser: dpr 2.25 and 853 px against 2.25 and 854. The window
is not zoomed; Qt scales it once, correctly.

Ctrl+Plus/=/keypad, Ctrl+Minus, Ctrl+0, Ctrl+wheel and the right-click
menu set one level for every tab, remembered as LEVEL= in its own file,
relative to the room. Two actions on one key are ambiguous to Qt and it
then does neither — Ctrl+Minus did nothing until each command became one
action with all its keys, which also fixes Ctrl+Shift+Tab.

The engine profile is built by one function, which the lab's checks now
use: a check with its own profile showed every worksheet blank.

The lab fences 10.10.0.0/16 as well: the development host reaches the
real Elmer over Tailscale, and the lab provisions a queue pointing at it.
Four lab checks written for older code are corrected; one had failed on
every run since 0.2.3.

tools/lab/wonderink-zoom-check: 18 checks. Lab: converged 120, print 39,
worksheets 24, all passing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ekklesia
2026-09-23 19:04:58 -05:00
co-authored by Claude Opus 5.5
parent 10433b850d
commit 48b3097c43
7 changed files with 527 additions and 62 deletions
+9 -4
View File
@@ -55,10 +55,15 @@ the display scale for itself asks that command rather than the file:
* **Plasma** — the panel, the clock, notifications, the volume display and
every dialog, because `classroom-scale` sets it as the display's scale
through `kscreen-doctor` at every login.
* **Chrome and Wonder Ink** — `--force-device-scale-factor`, because
Chrome on Wayland was measured not to follow the compositor's output
scale on its own. It is the same number, not a second scaling: Chrome
replaces its detected scale with it.
* **Chrome** — `--force-device-scale-factor`, because Chrome on the sway
session was measured not to follow the compositor's output scale on its
own. **Under Plasma it does**, so this is now a second scaling: measured
at 150%, Chrome's pages report `devicePixelRatio` 2.25, not 1.5. Left as
it is in 0.2.6.1 because it is the size teachers know; see
[wonder-ink.md](wonder-ink.md#how-large-a-lesson-is).
* **Wonder Ink** — its window follows the compositor as every Qt
application does, and its *pages* start at a zoom of `UI_SCALE`, so a
lesson is the size the browser shows it.
* **The disc player's own surfaces** — they are measured in the logical
pixels the compositor is already scaling, so they follow without being
told.