mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-09 03: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.
This commit is contained in:
parent
d789f7c3ad
commit
cec1579ebf
95 changed files with 536 additions and 9680 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "player_list_widget.h"
|
||||
|
||||
#include "../../interface/pixel_map_generator.h"
|
||||
#include "../../interface/theme_icon.h"
|
||||
#include "../../interface/widgets/server/user/user_context_menu.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_user.pb.h"
|
||||
#include "user_level.h"
|
||||
|
|
@ -67,13 +68,13 @@ PlayerListWidget::PlayerListWidget(TabSupervisor *_tabSupervisor,
|
|||
QWidget *parent)
|
||||
: QTreeWidget(parent), tabSupervisor(_tabSupervisor), client(_client), game(_game), gameStarted(false)
|
||||
{
|
||||
readyIcon = themePixmap(QStringLiteral("icons/ready_start"));
|
||||
notReadyIcon = themePixmap(QStringLiteral("icons/not_ready_start"));
|
||||
concededIcon = themePixmap(QStringLiteral("icons/conceded"));
|
||||
playerIcon = loadColorAdjustedPixmap("theme:icons/player");
|
||||
judgeIcon = loadColorAdjustedPixmap("theme:icons/scales");
|
||||
spectatorIcon = loadColorAdjustedPixmap("theme:icons/spectator");
|
||||
lockIcon = themePixmap(QStringLiteral("icons/lock"));
|
||||
readyIcon = loadThemedIcon(QStringLiteral("icons/ready_start"));
|
||||
notReadyIcon = loadThemedIcon(QStringLiteral("icons/not_ready_start"));
|
||||
concededIcon = loadThemedIcon(QStringLiteral("icons/conceded"));
|
||||
playerIcon = loadThemedIcon(QStringLiteral("icons/player"));
|
||||
judgeIcon = loadThemedIcon(QStringLiteral("icons/scales"));
|
||||
spectatorIcon = loadThemedIcon(QStringLiteral("icons/spectator"));
|
||||
lockIcon = loadThemedIcon(QStringLiteral("icons/lock"));
|
||||
|
||||
if (tabSupervisor) {
|
||||
itemDelegate = new PlayerListItemDelegate(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue