From 63badeaed5a08b5325e1ffb9bf0962580aed3283 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Tue, 21 Jul 2026 21:11:07 +0200 Subject: [PATCH] gatelock: warm-tint the unified-design-system palette, add on-fill token Mirrors the palette rework already applied to diet-guard/dufs-cloud/ screen-locker. Adds `on_fill` (dark) for text drawn on a filled accent/ success/warning/danger surface -- near-white text under-contrasts on all four (measured 2.2-3.6:1, below the 4.5:1 floor); dark text passes 5.8-9.7:1 on every one of them. Bumps to 0.1.1 since this is a real release: the 3 consumer repos pin gatelock to a git tag, not editable. --- gatelock/README.md | 2 +- gatelock/gatelock/_window.py | 32 +++++++++++++++++++++++++++++++- gatelock/pyproject.toml | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/gatelock/README.md b/gatelock/README.md index 924ce73..a075002 100644 --- a/gatelock/README.md +++ b/gatelock/README.md @@ -18,7 +18,7 @@ now lives. ## Install ```bash -pip install "gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.1.0#subdirectory=gatelock" +pip install "gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.1.1#subdirectory=gatelock" ``` ## Usage diff --git a/gatelock/gatelock/_window.py b/gatelock/gatelock/_window.py index 8ef68f1..2b27da9 100644 --- a/gatelock/gatelock/_window.py +++ b/gatelock/gatelock/_window.py @@ -60,6 +60,27 @@ class LockConfig: grab) -- there is no give-up/fallback in that case. grab_log_every: Log a warning every N failed retry-forever attempts. bg: Background color for the root window. + fg: Primary (near-white) text color. + muted: Secondary/caption text color. + field_bg: Background for "raised" surfaces (entry/spinbox fields, + input wells) -- one step lighter than ``bg``. + accent: The shared brand accent (buttons, primary actions). + success: Positive/on-track status color. + warning: Caution/pending status color. + danger: Negative/error status color. + on_fill: Text/icon color for anything drawn on top of a filled + accent/success/warning/danger surface (e.g. a button's label) -- + NOT ``fg``. All four fills sit in the same mid-light band, so + near-white text under-contrasts on every one of them; callers + must pick ``fg`` vs. ``on_fill`` based on the widget's own + background, never hardcode one for all buttons. + font_family: Default font family for lock-window widgets. + + All color/font defaults come from the ``unified-design-system`` skill + (``~/.claude/skills/unified-design-system/references/tokens.md``) -- the + same palette used by every one of kuhy's apps, Flutter and web included. + screen-locker, wake_alarm, and diet_guard should read these fields + instead of re-hardcoding their own hex/font literals. """ mode: LockMode = "hard" @@ -68,7 +89,16 @@ class LockConfig: disable_vt: bool | None = None grab_retry_ms: int | None = None grab_log_every: int = 25 - bg: str = "#1a1a1a" + bg: str = "#211D1B" + fg: str = "#ECEAE9" + muted: str = "#AAA09A" + field_bg: str = "#2B2624" + accent: str = "#B8862E" + success: str = "#8A9A3C" + warning: str = "#E0A63C" + danger: str = "#E2585F" + on_fill: str = "#211D1B" + font_family: str = "Arial" def resolved_overrideredirect(self) -> bool: """Return the effective overrideredirect setting.""" diff --git a/gatelock/pyproject.toml b/gatelock/pyproject.toml index 0abff25..11d097a 100644 --- a/gatelock/pyproject.toml +++ b/gatelock/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gatelock" -version = "0.1.0" +version = "0.1.1" description = "Shared fullscreen lock-window + HMAC log-integrity backend for blocking-overlay apps" requires-python = ">=3.10" dependencies = [] # pure stdlib — tkinter is bundled with Python