mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
[DeckShare] Resolve the share theme icon through themePixmap
QPixmap("theme:icons/share") has no file extension, so ThemeManager::assetPath()
is bypassed and the pixmap is always null. Use themePixmap(QStringLiteral("icons/share"))
like every other toolbar action, so the .svg (and dark/light variants) resolves.
This commit is contained in:
parent
9b60e8e7e1
commit
f74a957059
2 changed files with 2 additions and 2 deletions
|
|
@ -165,7 +165,7 @@ TabDeckStorage::TabDeckStorage(TabSupervisor *_tabSupervisor,
|
||||||
connect(aDeleteRemoteDeck, &QAction::triggered, this, &TabDeckStorage::actDeleteRemoteDeck);
|
connect(aDeleteRemoteDeck, &QAction::triggered, this, &TabDeckStorage::actDeleteRemoteDeck);
|
||||||
|
|
||||||
aShareDecks = new QAction(this);
|
aShareDecks = new QAction(this);
|
||||||
aShareDecks->setIcon(QPixmap("theme:icons/share"));
|
aShareDecks->setIcon(themePixmap(QStringLiteral("icons/share")));
|
||||||
connect(aShareDecks, &QAction::triggered, this, &TabDeckStorage::actShareDecks);
|
connect(aShareDecks, &QAction::triggered, this, &TabDeckStorage::actShareDecks);
|
||||||
|
|
||||||
// Add actions to toolbars
|
// Add actions to toolbars
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ VisualDeckStorageWidget::VisualDeckStorageWidget(QWidget *parent) : QWidget(pare
|
||||||
connect(refreshButton, &QPushButton::clicked, this, &VisualDeckStorageWidget::refreshIfPossible);
|
connect(refreshButton, &QPushButton::clicked, this, &VisualDeckStorageWidget::refreshIfPossible);
|
||||||
|
|
||||||
shareButton = new QToolButton(this);
|
shareButton = new QToolButton(this);
|
||||||
shareButton->setIcon(QPixmap("theme:icons/share"));
|
shareButton->setIcon(themePixmap(QStringLiteral("icons/share")));
|
||||||
shareButton->setFixedSize(32, 32);
|
shareButton->setFixedSize(32, 32);
|
||||||
shareButton->setVisible(false);
|
shareButton->setVisible(false);
|
||||||
connect(shareButton, &QPushButton::clicked, this, &VisualDeckStorageWidget::shareRequested);
|
connect(shareButton, &QPushButton::clicked, this, &VisualDeckStorageWidget::shareRequested);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue