Cockatrice/cockatrice/src/interface
Lukas Brübach 66196f6a60 [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:42:25 +01:00
..
card_database_update [QtUtils] Use makeLayout() for zero-margin layouts (#7620) 2026-10-24 19:06:18 +02:00
card_picture_loader [PictureLoader] Fix malformed MIME wildcards in Accept header (#6609) 2026-11-06 23:19:02 +01:00
deck_loader Fix deck export and mana group ordering (#7729) 2026-11-04 15:43:38 +01:00
intents [Settings] Store server profiles with QSettings arrays (#7629) 2026-11-02 07:30:29 +01:00
layouts [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
palette_editor [Icons] Keep semantic red and green on themed glyphs 2026-11-07 00:12:56 +01:00
widgets [Icons] Add a sticker icon treatment 2026-11-07 10:42:25 +01:00
at_risk_data_warning.cpp [Installer][Client] Back up user data before old uninstallers can delete it (#7503) 2026-10-16 22:05:42 +02:00
at_risk_data_warning.h [Installer][Client] Back up user data before old uninstallers can delete it (#7503) 2026-10-16 22:05:42 +02:00
card_localization.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
key_signals.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
key_signals.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
logger.cpp [CrashReporting] Mock crash-report dialog and reporting preference (#7521) 2026-10-19 14:57:03 +02:00
logger.h [CrashReporting] Mock crash-report dialog and reporting preference (#7521) 2026-10-19 14:57:03 +02:00
pixel_map_generator.cpp [Icons] Migrate UI glyphs to palette-token SVGs (#7595) 2026-11-04 18:39:41 +01:00
pixel_map_generator.h [Icons] Migrate UI glyphs to palette-token SVGs (#7595) 2026-11-04 18:39:41 +01:00
recording.cpp [Tests] Replay XML test files through a headless runner (#7694) 2026-11-04 06:23:43 +01:00
recording.h [Tests] Replay XML test files through a headless runner (#7694) 2026-11-04 06:23:43 +01:00
theme_config.cpp [Icons] Keep semantic red and green on themed glyphs 2026-11-07 00:12:56 +01:00
theme_config.h [Icons] Keep semantic red and green on themed glyphs 2026-11-07 00:12:56 +01:00
theme_icon.cpp [Icons] Add a sticker icon treatment 2026-11-07 10:42:25 +01:00
theme_icon.h [Icons] Add a sticker icon treatment 2026-11-07 10:42:25 +01:00
theme_icon_badge.cpp [Icons] Add a sticker icon treatment 2026-11-07 10:42:25 +01:00
theme_icon_badge.h [Icons] Add a sticker icon treatment 2026-11-07 10:42:25 +01:00
theme_icon_fill.cpp [Icons] Add a sticker icon treatment 2026-11-07 10:42:25 +01:00
theme_icon_fill.h [Icons] Add a sticker icon treatment 2026-11-07 10:42:25 +01:00
theme_icon_sticker.cpp [Icons] Add a sticker icon treatment 2026-11-07 10:42:25 +01:00
theme_icon_sticker.h [Icons] Add a sticker icon treatment 2026-11-07 10:42:25 +01:00
theme_manager.cpp [Icons] Keep semantic red and green on themed glyphs 2026-11-07 00:12:56 +01:00
theme_manager.h [Icons] Keep semantic red and green on themed glyphs 2026-11-07 00:12:56 +01:00
window_main.cpp [Icons] Migrate UI glyphs to palette-token SVGs (#7595) 2026-11-04 18:39:41 +01:00
window_main.h [Tests] Replay XML test files through a headless runner (#7694) 2026-11-04 06:23:43 +01:00