Cockatrice/libcockatrice_utility/libcockatrice/utility
Lukas Brübach 876d66ffc9 [Icons] Add a sticker icon treatment
The pre-#7595 add, remove and delete icons were filled shapes with a black
outline and no disc. A tint cannot bring that back, and the badge disc is a
different icon language, so add a third value to the existing style axis.

IconStyle::Sticker draws the sentinel glyph twice: a near-black rim at the
band width plus one rim on each side, then the tone pass clipped to the glyph
and filled with a vertical gradient. Both treatments keep the disabled
fallback to the line glyph.

The fill rule moves into theme_icon_fill: the semantic tones are tuned for
text, so a filled shape gives its tone a saturation floor, and a dark-scheme
tone is pulled down rather than up. IconTint::resolve() applies the same floor
to line glyphs, and the badge disc uses the same fill, so a line, a badge and
a sticker next to each other carry the same green or red instead of a pale
line beside a saturated glyph.

The badge's glyph ink follows the scheme: white on light-scheme tones, as in
the pre-#7595 art, and the saturated tone darkened to an outline-dark ink on
dark-scheme tones, where the shared saturated disc is light enough that white
would sit near 2.7:1. The new test pins both cases so the glyph cannot
silently flip.

resolveSvgStrokeWidth() moves the stroke-width rewrite into
libcockatrice_utility so the badge and the sticker share it; the badge's local
copy is gone.

The sticker is opted into at 17 call sites: increment, decrement and
remove_row in the deck editor, settings pages, token dialog, server dialogs
and replay/deck storage tabs. The visual database's clear-filter button keeps
its trash can (icons/delete) in the line treatment: that glyph is new in
#7595, but it is the clearer metaphor, and a sticker rim closes its lid gap
at toolbar sizes.

The preview generators also gain a semantic-tint sheet for #7775 and a
line/badge/sticker family strip, so the three PR descriptions can show the
same rendered colors.
2026-11-07 10:43:54 +01:00
..
card_ref.h [DeckList] Move metadata into struct (#6380) 2025-11-30 13:09:09 +01:00
clamped_arithmetic.h Unify counter clamp arithmetic into shared addClamped() helper (#7009) 2026-06-28 16:10:57 -07:00
color.h [Game][Counters] Split counters into AbstractCounter (graphics) and CounterState (logic) (#6917) 2026-05-21 20:16:28 +02:00
counter_limits.h Split trice_limits.h into dedicated headers (#7025) 2026-06-29 14:37:52 -07:00
cryptoutil.cpp [Security] Add challenge-response auth with scrypt verifiers and stop storing plaintext passwords (#7193) 2026-10-16 22:52:26 +02:00
cryptoutil.h [Security] Add challenge-response auth with scrypt verifiers and stop storing plaintext passwords (#7193) 2026-10-16 22:52:26 +02:00
days_years_between.h [Room][UserList] Introduce style delegate (#6981) 2026-06-26 20:52:24 -04:00
debouncer.h [QtUtils] Add Debouncer helper (#7623) 2026-10-24 22:43:10 +02:00
dice_limits.h Split trice_limits.h into dedicated headers (#7025) 2026-06-29 14:37:52 -07:00
expression.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
expression.h Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
installer_close_protocol.h [Installer] Graceful close and a way out of a stuck update (#7687) 2026-10-31 15:32:59 +01:00
levenshtein.cpp [Search] Stop allocating per card in card-name completion (#7604) 2026-10-23 11:23:04 +02:00
levenshtein.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
local_server_name.h [Client] Improve card database update visibility (#7458) 2026-10-09 11:07:48 +02:00
macros.h Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
passwordhasher.cpp [Utility] Budget scrypt's XY array in the derivation memory limit (#7712) 2026-11-02 07:29:15 +01:00
passwordhasher.h [Security] Add challenge-response auth with scrypt verifiers and stop storing plaintext passwords (#7193) 2026-10-16 22:52:26 +02:00
peglib.h Update peglib to v1.16.0 (#7134) 2026-08-17 22:52:30 +02:00
playmat_params.h [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
qt_utils.h [QtUtils] Add window fade, path opening, bold font and confirmation helpers (#7621) 2026-10-24 21:38:54 +02:00
report_categories.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
report_categories.h [Server/Client] Unify report categories (#7345) 2026-09-24 18:37:54 +02:00
server_rate_limiter.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
server_rate_limiter.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
string_limits.h [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
svg_recolor.cpp [Icons] Add a sticker icon treatment 2026-11-07 10:43:54 +01:00
svg_recolor.h [Icons] Add a sticker icon treatment 2026-11-07 10:43:54 +01:00
translation_loader.cpp [Translation] Name languages without reading the translation files (#7662) 2026-10-26 02:39:26 +01:00
translation_loader.h [Translation] Name languages without reading the translation files (#7662) 2026-10-26 02:39:26 +01:00
user_data_backup.cpp [Installer][Client] Back up user data before old uninstallers can delete it (#7503) 2026-10-16 22:05:42 +02:00
user_data_backup.h [Installer][Client] Back up user data before old uninstallers can delete it (#7503) 2026-10-16 22:05:42 +02:00
warning_categories.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
warning_categories.h [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
zone_names.h Refactor zone names (#6686) 2026-03-12 00:34:05 +01:00