mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -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.
This commit is contained in:
parent
9b640198ce
commit
fa5133071d
95 changed files with 536 additions and 9680 deletions
|
|
@ -50,6 +50,7 @@
|
|||
#include "latency_tracker.h"
|
||||
#include "logger.h"
|
||||
#include "pixel_map_generator.h"
|
||||
#include "theme_icon.h"
|
||||
#include "version_string.h"
|
||||
#include "widgets/dialogs/dlg_connect.h"
|
||||
#include "widgets/server/handle_public_servers.h"
|
||||
|
|
@ -387,10 +388,10 @@ void MainWindow::retranslateUi()
|
|||
aRegister->setText(tr("&Register to server..."));
|
||||
aForgotPassword->setText(tr("&Restore password..."));
|
||||
aSettings->setText(tr("&Settings..."));
|
||||
aSettings->setIcon(themePixmap(QStringLiteral("icons/settings")));
|
||||
aSettings->setIcon(loadThemedIcon(QStringLiteral("icons/settings")));
|
||||
settingsButton->setToolTip(tr("Settings"));
|
||||
settingsButton->setAccessibleName(tr("Settings"));
|
||||
settingsButton->setIcon(themePixmap(QStringLiteral("icons/cogwheel")));
|
||||
settingsButton->setIcon(loadThemedIcon(QStringLiteral("icons/settings")));
|
||||
aExit->setText(tr("&Exit"));
|
||||
|
||||
#if defined(__APPLE__) /* For OSX */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue