From 5312537c9fc12eed4d14d89d9cc1a226f2df94c3 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Fri, 21 Aug 2026 09:58:05 +0200 Subject: fix(colitur-x): make the selection and the I-class marker legible Both markers were drawn in gold, which works on a dark cell and very nearly disappears on a white one -- and most days are white. The selection is now ringed twice, dark outside and bright inside, so it reads against a white cell and a red one without knowing which it is. The I-class marker is a badge rather than coloured text: filled with the cell's own foreground and lettered in its background, so it inverts against whatever the day's liturgical colour is. It also opens on TODAY when the input covers it, which is what a viewer should do; colitur's kernel still never reads a clock. Drawing now goes to an off-screen pixmap and CX_DUMP writes one frame out, so the result can be checked without screenshotting a window whose contents X does not retain while it is obscured. --- config.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'config.h') diff --git a/config.h b/config.h index 5b242b4..6fe5857 100644 --- a/config.h +++ b/config.h @@ -18,6 +18,18 @@ static const char *col_bg = "#141414"; /* window background */ static const char *col_grid = "#3a3a3a"; /* cell borders */ static const char *col_head = "#8a8a8a"; /* weekday headings */ static const char *col_detail = "#e8e8e8"; /* detail pane text */ -static const char *col_rank1 = "#ffcc55"; /* I-class marker */ +/* The selected day is ringed TWICE: a dark ring outside a bright one, so + the marker survives on a white cell and on a red one alike. A single + bright ring vanishes against white; a single dark one vanishes against + black. */ +static const char *col_sel_dark = "#1a1a1a"; +static const char *col_sel_light = "#ffd24a"; +enum { SEL_RING = 3 }; /* px per ring */ + +/* A I-class day is marked with a BADGE, not coloured text: the badge is + filled with the cell's own foreground and the glyph drawn in its + background, so it inverts against whatever the day's colour is. Gold on + white -- the first attempt -- was very nearly invisible. */ +static const char *rank1_glyph = "I"; enum { CELL_W = 122, CELL_H = 74, PAD = 10, HEAD_H = 46, DETAIL_H = 92 }; -- cgit v1.3