Cockatrice/oracle
Lukas Brübach d789f7c3ad [Icons] Add palette-aware themed icon engine
A QPixmap snapshot cannot follow palette changes, so expose a QIcon whose
engine resolves the `currentColor` sentinel from the live palette on every
pixmap request. Icons stay legible across light/dark switches without
recreating actions or buttons.

- Resolve the asset, its bytes and its intrinsic size once, and drop them on
  ThemeManager::themeChanged/paletteChanged. A repaint does no file I/O and
  no theme.cfg parse; the palette color stays part of the render cache key.
- Centre the glyph on QRectF(rect).center(): QRect::center() floors and uses
  right = left + width - 1, which shifted every 16x16 item-view glyph up and
  left by a logical pixel and clipped its last row and column.
- Take a raster override's intrinsic size from QImageReader instead of the
  24x24 SVG default, so a non-square override reports the box it draws.
- Set the device pixel ratio before inserting into the render cache, so a
  cache hit no longer detaches the pixmap on every paint.
2026-11-02 15:51:58 +01:00
..
resources Update macOS Monterey app icon (#4805) 2023-08-06 17:46:03 -04:00
src [Translation] Name languages without reading the translation files (#7662) 2026-10-26 02:39:26 +01:00
translations Updates for project Cockatrice and language ru (#7561) 2026-10-17 16:43:14 +02:00
CMakeLists.txt [Icons] Add palette-aware themed icon engine 2026-11-02 15:51:58 +01:00
oracle.desktop Add icon to oracle 2014-08-07 17:27:15 +02:00
oracle.qrc Add icon to oracle 2014-08-07 17:27:15 +02:00
oracle.rc Add icon to oracle 2014-08-07 17:27:15 +02:00
oracle_en@source.ts Update translation source strings (#7397) 2026-10-04 21:08:47 +02:00