mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 01:23:24 -08:00
* [Icons] Migrate UI glyphs to palette-token SVGs Runtime inversion is not a theming system: it rotates hue, breaks duotone art and mishandles alpha, and a QPixmap snapshot cannot follow a palette change. Redraw the top-level UI glyph set on a 24x24 grid with `currentColor` as the paint token, drop Inkscape/Sodipodi cruft, and delete the icons whose metaphor was duplicated (cogwheel/gear -> settings, scale_balanced -> scales, update.png -> reload). Load the glyphs through `loadThemedIcon` so the engine resolves the token from the palette on every request, and let `themePixmap` use the same resolution for one-shot pixmaps. `loadColorAdjustedPixmap` is gone; every caller now keeps a QIcon, which `SettingsButtonWidget::setButtonIcon` accepts instead of a QPixmap. Content art (mana, counters, countries) keeps its authored colors. Add a render test covering aspect ratio, palette flips, icon modes and high-DPI pixmaps. * [Tests] Keep the icon render test QApplication alive until exit Creating it as a function-local static tears it down before Qt's library statics at exit, and libQt6Network then runs QObject destructors against freed memory — a SEGV the sanitizer leg reports after the tests have already passed. Leak the application instead, the usual pattern for a test binary. * [Icons] Render lock and dropdown glyphs through the icon engine Both generators rendered the sentinel SVG to a fixed height x height pixmap at DPR 1. The pre-migration path rendered larger and let QIcon scale it, so on a 2x display the games-list lock (13px) and the banner dropdown arrow (24px) came back crisp; the new path hands the widget a DPR-1 bitmap that gets upscaled and blurred. - The games list asks the themed engine for `icons/lock` directly, so the item view paints it at the device pixel ratio and the lock also follows HighlightedText on a selected row. - The dropdown goes through `loadThemedIcon(...).pixmap(size, dpr)`, which keeps the glyph's aspect ratio and renders at the requested ratio. - LockPixmapGenerator has no consumer left, so it and its cache are gone. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> |
||
|---|---|---|
| .. | ||
| card_zone_algorithms | ||
| carddatabase | ||
| deck_list_model | ||
| deck_list_zones | ||
| game | ||
| loading_from_clipboard | ||
| model_contract | ||
| movecard_tests | ||
| oracle | ||
| picture_loader_benchmark | ||
| settings | ||
| support | ||
| theme_migration | ||
| card_art_crop_test.cpp | ||
| card_update_progress_test.cpp | ||
| clamped_arithmetic_test.cpp | ||
| client_login_status_test.cpp | ||
| CMakeLists.txt | ||
| crash_reporter_test.cpp | ||
| deck_hash_performance_test.cpp | ||
| deck_state_manager_test.cpp | ||
| expression_test.cpp | ||
| font_config_test.cpp | ||
| forwarded_address_test.cpp | ||
| holder_line_test.cpp | ||
| installer_close_server_test.cpp | ||
| lag_monitor_test.cpp | ||
| latency_tracker_test.cpp | ||
| loader_local_matching_test.cpp | ||
| local_client_lifetime_test.cpp | ||
| metrics_registry_test.cpp | ||
| moxfield_signature_spells_test.cpp | ||
| password_hash_test.cpp | ||
| payload_paths_test.cpp | ||
| playmat_resolver_test.cpp | ||
| rate_limiter_test.cpp | ||
| report_categories_test.cpp | ||
| server_card_counter_test.cpp | ||
| server_counter_test.cpp | ||
| server_developer_role_test.cpp | ||
| server_dump_zone_test.cpp | ||
| server_forced_password_change_test.cpp | ||
| server_game_join_test.cpp | ||
| server_logger_test.cpp | ||
| server_moderator_role_test.cpp | ||
| server_rate_limiter_test.cpp | ||
| server_room_channels_test.cpp | ||
| single_instance_manager_test.cpp | ||
| spoiler_file_test.cpp | ||
| svg_recolor_test.cpp | ||
| test_age_formatting.cpp | ||
| translation_loader_test.cpp | ||
| translation_loader_test.ts | ||
| trusted_sources_test.cpp | ||
| user_data_backup_test.cpp | ||
| user_games_model_test.cpp | ||
| warning_categories_test.cpp | ||