Cockatrice/tests/theme_migration/CMakeLists.txt
Lukas Brübach e46e012903 [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. The badge disc uses the same rule, so a
badge and a sticker next to each other carry the same green or red instead of
a pale disc beside a saturated glyph.

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 16 call sites: increment, decrement and
remove_row in the deck editor, settings pages, token dialog, server dialogs
and replay/deck storage tabs. The clear-filter button keeps the old X glyph
(icons/remove_row) it had before #7595, because its trash-can replacement has
no pre-#7595 counterpart and the sticker stroke closes the handle at toolbar
sizes.
2026-11-06 20:43:15 +01:00

28 lines
1.1 KiB
CMake

cockatrice_add_test(
NAME
theme_migration_test
SOURCES
${CMAKE_SOURCE_DIR}/cockatrice/src/interface/theme_manager.cpp
${CMAKE_SOURCE_DIR}/cockatrice/src/interface/theme_config.cpp
${CMAKE_SOURCE_DIR}/cockatrice/src/interface/pixel_map_generator.cpp
${CMAKE_SOURCE_DIR}/cockatrice/src/interface/theme_icon.cpp
${CMAKE_SOURCE_DIR}/cockatrice/src/interface/theme_icon_badge.cpp
${CMAKE_SOURCE_DIR}/cockatrice/src/interface/theme_icon_fill.cpp
${CMAKE_SOURCE_DIR}/cockatrice/src/interface/theme_icon_sticker.cpp
${CMAKE_SOURCE_DIR}/cockatrice/src/client/settings/cache_settings.cpp
${CMAKE_SOURCE_DIR}/cockatrice/src/client/settings/card_counter_settings.cpp
${CMAKE_SOURCE_DIR}/cockatrice/src/client/settings/shortcuts_settings.cpp
${CMAKE_SOURCE_DIR}/cockatrice/src/client/network/update/client/release_channel.cpp
${VERSION_STRING_CPP}
theme_migration_test.cpp
theme_icon_render_test.cpp
LIBS
libcockatrice_settings
libcockatrice_network
libcockatrice_network_server_remote
libcockatrice_protocol
INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/cockatrice/src
DEFINITIONS
COCKATRICE_SOURCE_DIR="${CMAKE_SOURCE_DIR}"
)