diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-18 19:09:23 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-18 19:09:23 +0200 |
| commit | d975c14645554cfbe9ba1d8c9279f51bd8407673 (patch) | |
| tree | e5b60d21939ea02b4e2cb50a4342d071763083b1 /README.md | |
| parent | 7fddddcd39bb250cd2653e130c8f7899d2d3f19c (diff) | |
| download | conky-theme-udt-d975c14645554cfbe9ba1d8c9279f51bd8407673.tar.gz conky-theme-udt-d975c14645554cfbe9ba1d8c9279f51bd8407673.zip | |
feat: add a title icon to every labelled card
Add card.ICON and a card.title helper that draws the glyph in the
highlight colour before the label, at the label's own size. The eight
labelled cards use it, in both the fit_unit width measurement and the
draw, so the icon cannot overrun a narrow cell. Clock (no label) and
weather (condition glyph already) are unchanged, and the no-data notice
titles stay text-only.
Codepoints were chosen against a rendered contact sheet, not fontconfig
alone, since a wrong codepoint draws a plausible neighbour.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -264,6 +264,9 @@ carries the primitives it should use rather than reaching for Cairo directly: to a right edge. - `notice(cr, inner, colors, title, note, hint)` draws the no-data face every cached card shares when its sampler has not run. +- `title(cr, x, y, icon, text, colors)` draws a card title: the icon in + `highlight`, the text in `label`. `title_str(icon, text)` returns the same run + as a string, for `fit_unit` to measure. The glyphs live in `card.ICON`. - `measure(cr, s)` returns the **ink** size, what the glyphs actually cover. Use it to centre or right-align. - `advance(cr, s)` returns the **x_advance**, how far the cursor moves after |
