mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 11:03:25 -08:00
[Icons] Migrate UI glyphs to palette-token SVGs (#7595)
* [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>
This commit is contained in:
parent
020d9e8dcb
commit
627c7a83aa
97 changed files with 543 additions and 9711 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "pixel_map_generator.h"
|
||||
|
||||
#include "libcockatrice/network/server/remote/user_level.h"
|
||||
#include "theme_icon.h"
|
||||
#include "theme_manager.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
|
@ -15,7 +16,6 @@
|
|||
#include <QDomNodeList>
|
||||
#include <QFile>
|
||||
#include <QIODevice>
|
||||
#include <QImage>
|
||||
#include <QImageReader>
|
||||
#include <QLatin1Char>
|
||||
#include <QLatin1String>
|
||||
|
|
@ -436,33 +436,19 @@ QIcon UserLevelPixmapGenerator::generateIconWithColorOverride(int height,
|
|||
|
||||
QMap<QString, QIcon> UserLevelPixmapGenerator::iconCache;
|
||||
|
||||
QPixmap LockPixmapGenerator::generatePixmap(int height)
|
||||
{
|
||||
|
||||
int key = height;
|
||||
if (pmCache.contains(key)) {
|
||||
return pmCache.value(key);
|
||||
}
|
||||
|
||||
QPixmap pixmap = tryLoadImage(QStringLiteral("theme:") + themeManager->assetPath(QStringLiteral("icons/lock")),
|
||||
QSize(height, height), true);
|
||||
pmCache.insert(key, pixmap);
|
||||
return pixmap;
|
||||
}
|
||||
|
||||
QMap<int, QPixmap> LockPixmapGenerator::pmCache;
|
||||
|
||||
QPixmap DropdownIconPixmapGenerator::generatePixmap(int height, bool expanded)
|
||||
{
|
||||
QString key = QString::number(expanded) + ":" + QString::number(height);
|
||||
const QString key = QString::number(expanded) + ":" + QString::number(height);
|
||||
if (pmCache.contains(key)) {
|
||||
return pmCache.value(key);
|
||||
}
|
||||
|
||||
QString name = expanded ? "dropdown_expanded" : "dropdown_collapsed";
|
||||
QPixmap pixmap = tryLoadImage(QStringLiteral("theme:") + themeManager->assetPath(QStringLiteral("icons/") + name),
|
||||
QSize(height, height), true);
|
||||
|
||||
// Render through the themed icon engine: it keeps the glyph's aspect ratio,
|
||||
// follows the palette, and renders at the device pixel ratio instead of
|
||||
// handing a DPR-1 bitmap to a label that would upscale and blur it on a 2x
|
||||
// display.
|
||||
const QString prefix = QStringLiteral("icons/") + (expanded ? "dropdown_expanded" : "dropdown_collapsed");
|
||||
const QPixmap pixmap = loadThemedIcon(prefix).pixmap(QSize(height, height), qApp->devicePixelRatio());
|
||||
pmCache.insert(key, pixmap);
|
||||
return pixmap;
|
||||
}
|
||||
|
|
@ -520,30 +506,11 @@ QPixmap ManaSymbolPixmapGenerator::generatePixmap(const QString &symbol, const Q
|
|||
QHash<QString, QPixmap> ManaSymbolPixmapGenerator::masterCache;
|
||||
QHash<QString, QPixmap> ManaSymbolPixmapGenerator::scaledCache;
|
||||
|
||||
QPixmap loadColorAdjustedPixmap(const QString &name)
|
||||
{
|
||||
// Prefer an authored scheme-qualified variant when one exists for this asset.
|
||||
const QString variant = themeManager->schemeVariantPath(QStringView(name).mid(QStringLiteral("theme:").size()));
|
||||
if (!variant.isEmpty()) {
|
||||
return QPixmap(QStringLiteral("theme:") + variant);
|
||||
}
|
||||
|
||||
// Legacy fallback: runtime-invert for dark mode when no authored variant.
|
||||
if (qApp->palette().windowText().color().lightness() > 200) {
|
||||
QImage img(name);
|
||||
img.invertPixels();
|
||||
QPixmap result;
|
||||
result.convertFromImage(img);
|
||||
return result;
|
||||
} else {
|
||||
return QPixmap(name);
|
||||
}
|
||||
}
|
||||
|
||||
QPixmap themePixmap(QStringView prefix)
|
||||
{
|
||||
const QString resolved = themeManager->assetPath(prefix);
|
||||
return QPixmap(QStringLiteral("theme:") + resolved);
|
||||
const QPixmap sentinel = loadSentinelSvgPixmap(resolved);
|
||||
return sentinel.isNull() ? QPixmap(QStringLiteral("theme:") + resolved) : sentinel;
|
||||
}
|
||||
|
||||
void clearPixmapGeneratorCaches()
|
||||
|
|
@ -553,7 +520,6 @@ void clearPixmapGeneratorCaches()
|
|||
PingPixmapGenerator::clear();
|
||||
CountryPixmapGenerator::clear();
|
||||
UserLevelPixmapGenerator::clear();
|
||||
LockPixmapGenerator::clear();
|
||||
DropdownIconPixmapGenerator::clear();
|
||||
ManaSymbolPixmapGenerator::clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,19 +106,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class LockPixmapGenerator
|
||||
{
|
||||
private:
|
||||
static QMap<int, QPixmap> pmCache;
|
||||
|
||||
public:
|
||||
static QPixmap generatePixmap(int height);
|
||||
static void clear()
|
||||
{
|
||||
pmCache.clear();
|
||||
}
|
||||
};
|
||||
|
||||
class DropdownIconPixmapGenerator
|
||||
{
|
||||
private:
|
||||
|
|
@ -160,13 +147,11 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
QPixmap loadColorAdjustedPixmap(const QString &name);
|
||||
|
||||
// Loads a "theme:" asset (with no file extension in prefix), preferring the
|
||||
// Returns a "theme:" asset (with no file extension in prefix), preferring the
|
||||
// scheme-qualified variant (prefix-dark / prefix-light, resolved via
|
||||
// ThemeManager::assetPath) and falling back to the plain asset. Callers load
|
||||
// the returned path directly. Use for scheme-sensitive pixmaps like
|
||||
// backgrounds, the card back, and the app logo.
|
||||
// ThemeManager::assetPath) and falling back to the plain asset. Token-driven
|
||||
// SVGs resolve their `currentColor` sentinel from the palette. Use for
|
||||
// scheme-sensitive pixmaps like backgrounds, the card back, and the app logo.
|
||||
QPixmap themePixmap(QStringView prefix);
|
||||
|
||||
// Clears every PixmapGenerator's static cache so scheme variants are
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "abstract_analytics_panel_widget.h"
|
||||
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../general/display/banner_widget.h"
|
||||
#include "deck_list_statistics_analyzer.h"
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ AbstractAnalyticsPanelWidget::AbstractAnalyticsPanelWidget(QWidget *parent, Deck
|
|||
|
||||
// config button
|
||||
configureButton = new QPushButton(this);
|
||||
configureButton->setIcon(themePixmap(QStringLiteral("icons/cogwheel")));
|
||||
configureButton->setIcon(loadThemedIcon(QStringLiteral("icons/settings")));
|
||||
configureButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||
connect(configureButton, &QPushButton::clicked, this, &AbstractAnalyticsPanelWidget::applyConfigFromDialog);
|
||||
bannerAndSettingsLayout->addWidget(configureButton, 0);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../filters/syntax_help.h"
|
||||
#include "../../key_signals.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../utility/custom_line_edit.h"
|
||||
#include "card_database_display_model.h"
|
||||
#include "card_database_model.h"
|
||||
|
|
@ -40,8 +40,8 @@ DeckEditorDatabaseDisplayWidget::DeckEditorDatabaseDisplayWidget(QWidget *parent
|
|||
searchEdit->setObjectName("searchEdit");
|
||||
searchEdit->setPlaceholderText(tr("Search by card name (or search expressions)"));
|
||||
searchEdit->setClearButtonEnabled(true);
|
||||
searchEdit->addAction(loadColorAdjustedPixmap("theme:icons/search"), QLineEdit::LeadingPosition);
|
||||
auto help = searchEdit->addAction(themePixmap(QStringLiteral("icons/info")), QLineEdit::TrailingPosition);
|
||||
searchEdit->addAction(loadThemedIcon(QStringLiteral("icons/search")), QLineEdit::LeadingPosition);
|
||||
auto help = searchEdit->addAction(loadThemedIcon(QStringLiteral("icons/info")), QLineEdit::TrailingPosition);
|
||||
|
||||
setFocusProxy(searchEdit);
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
|
|
@ -83,13 +83,13 @@ DeckEditorDatabaseDisplayWidget::DeckEditorDatabaseDisplayWidget(QWidget *parent
|
|||
&DeckEditorDatabaseDisplayWidget::onRelatedCardClicked);
|
||||
|
||||
aAddCard = new QAction(QString(), this);
|
||||
aAddCard->setIcon(themePixmap(QStringLiteral("icons/arrow_right_green")));
|
||||
aAddCard->setIcon(loadThemedIcon(QStringLiteral("icons/arrow_right")));
|
||||
connect(aAddCard, &QAction::triggered, this, &DeckEditorDatabaseDisplayWidget::actAddCardToMainDeck);
|
||||
auto *tbAddCard = new QToolButton(this);
|
||||
tbAddCard->setDefaultAction(aAddCard);
|
||||
|
||||
aAddCardToSideboard = new QAction(QString(), this);
|
||||
aAddCardToSideboard->setIcon(themePixmap(QStringLiteral("icons/arrow_right_blue")));
|
||||
aAddCardToSideboard->setIcon(loadThemedIcon(QStringLiteral("icons/arrow_right_sideboard")));
|
||||
connect(aAddCardToSideboard, &QAction::triggered, this, &DeckEditorDatabaseDisplayWidget::actAddCardToSideboard);
|
||||
auto *tbAddCardToSideboard = new QToolButton(this);
|
||||
tbAddCardToSideboard->setDefaultAction(aAddCardToSideboard);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../key_signals.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../playmat/playmat_settings_dialog.h"
|
||||
#include "../quick_settings/settings_button_widget.h"
|
||||
#include "../tabs/abstract_tab_deck_editor.h"
|
||||
|
|
@ -248,25 +248,25 @@ void DeckEditorDeckDockWidget::createDeckDock()
|
|||
&DeckEditorDeckDockWidget::applyActiveGroupCriteria);
|
||||
|
||||
aIncrement = new QAction(QString(), this);
|
||||
aIncrement->setIcon(themePixmap(QStringLiteral("icons/increment")));
|
||||
aIncrement->setIcon(loadThemedIcon(QStringLiteral("icons/increment")));
|
||||
connect(aIncrement, &QAction::triggered, this, &DeckEditorDeckDockWidget::actIncrementSelection);
|
||||
auto *tbIncrement = new QToolButton(this);
|
||||
tbIncrement->setDefaultAction(aIncrement);
|
||||
|
||||
aDecrement = new QAction(QString(), this);
|
||||
aDecrement->setIcon(themePixmap(QStringLiteral("icons/decrement")));
|
||||
aDecrement->setIcon(loadThemedIcon(QStringLiteral("icons/decrement")));
|
||||
connect(aDecrement, &QAction::triggered, this, &DeckEditorDeckDockWidget::actDecrementSelection);
|
||||
auto *tbDecrement = new QToolButton(this);
|
||||
tbDecrement->setDefaultAction(aDecrement);
|
||||
|
||||
aRemoveCard = new QAction(QString(), this);
|
||||
aRemoveCard->setIcon(themePixmap(QStringLiteral("icons/remove_row")));
|
||||
aRemoveCard->setIcon(loadThemedIcon(QStringLiteral("icons/remove_row")));
|
||||
connect(aRemoveCard, &QAction::triggered, this, &DeckEditorDeckDockWidget::actRemoveCard);
|
||||
auto *tbRemoveCard = new QToolButton(this);
|
||||
tbRemoveCard->setDefaultAction(aRemoveCard);
|
||||
|
||||
aSwapCard = new QAction(QString(), this);
|
||||
aSwapCard->setIcon(themePixmap(QStringLiteral("icons/swap")));
|
||||
aSwapCard->setIcon(loadThemedIcon(QStringLiteral("icons/swap")));
|
||||
connect(aSwapCard, &QAction::triggered, this, &DeckEditorDeckDockWidget::actSwapSelection);
|
||||
auto *tbSwapCard = new QToolButton(this);
|
||||
tbSwapCard->setDefaultAction(aSwapCard);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "../../../filters/filter_builder.h"
|
||||
#include "../../../filters/filter_tree_model.h"
|
||||
#include "../../key_signals.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../tabs/abstract_tab_deck_editor.h"
|
||||
#include "libcockatrice/filters/filter_card.h"
|
||||
|
||||
|
|
@ -64,11 +64,11 @@ void DeckEditorFilterDockWidget::createFiltersDock()
|
|||
connect(filterBuilder, &FilterBuilder::add, filterModel, &FilterTreeModel::addFilter);
|
||||
|
||||
aClearFilterOne = new QAction(QString(), this);
|
||||
aClearFilterOne->setIcon(themePixmap(QStringLiteral("icons/decrement")));
|
||||
aClearFilterOne->setIcon(loadThemedIcon(QStringLiteral("icons/decrement")));
|
||||
connect(aClearFilterOne, &QAction::triggered, this, &DeckEditorFilterDockWidget::actClearFilterOne);
|
||||
|
||||
aClearFilterAll = new QAction(QString(), this);
|
||||
aClearFilterAll->setIcon(themePixmap(QStringLiteral("icons/clearsearch")));
|
||||
aClearFilterAll->setIcon(loadThemedIcon(QStringLiteral("icons/clearsearch")));
|
||||
connect(aClearFilterAll, &QAction::triggered, this, &DeckEditorFilterDockWidget::actClearFilterAll);
|
||||
|
||||
auto *filterDelOne = new QToolButton();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "deck_list_history_manager_widget.h"
|
||||
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../quick_settings/settings_button_widget.h"
|
||||
#include "deck_state_manager.h"
|
||||
#include "libcockatrice/deck_list/deck_list_history_manager.h"
|
||||
|
|
@ -32,7 +32,7 @@ DeckListHistoryManagerWidget::DeckListHistoryManagerWidget(DeckStateManager *_de
|
|||
layout = new QHBoxLayout(this);
|
||||
|
||||
aUndo = new QAction(QString(), this);
|
||||
aUndo->setIcon(themePixmap(QStringLiteral("icons/arrow_undo")));
|
||||
aUndo->setIcon(loadThemedIcon(QStringLiteral("icons/arrow_undo")));
|
||||
aUndo->setShortcut(QKeySequence::Undo);
|
||||
aUndo->setShortcutContext(Qt::ApplicationShortcut);
|
||||
connect(aUndo, &QAction::triggered, this, &DeckListHistoryManagerWidget::doUndo);
|
||||
|
|
@ -41,7 +41,7 @@ DeckListHistoryManagerWidget::DeckListHistoryManagerWidget(DeckStateManager *_de
|
|||
undoButton->setDefaultAction(aUndo);
|
||||
|
||||
aRedo = new QAction(QString(), this);
|
||||
aRedo->setIcon(themePixmap(QStringLiteral("icons/arrow_redo")));
|
||||
aRedo->setIcon(loadThemedIcon(QStringLiteral("icons/arrow_redo")));
|
||||
aRedo->setShortcut(QKeySequence::Redo);
|
||||
aRedo->setShortcutContext(Qt::ApplicationShortcut);
|
||||
connect(aRedo, &QAction::triggered, this, &DeckListHistoryManagerWidget::doRedo);
|
||||
|
|
@ -53,7 +53,7 @@ DeckListHistoryManagerWidget::DeckListHistoryManagerWidget(DeckStateManager *_de
|
|||
layout->addWidget(redoButton);
|
||||
|
||||
historyButton = new SettingsButtonWidget(this);
|
||||
historyButton->setButtonIcon(themePixmap(QStringLiteral("icons/arrow_history")));
|
||||
historyButton->setButtonIcon(loadThemedIcon(QStringLiteral("icons/arrow_history")));
|
||||
|
||||
historyLabel = new QLabel(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "dlg_connect.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../server/handle_public_servers.h"
|
||||
#include "../server/user/user_info_connection.h"
|
||||
#include "libcockatrice/utility/macros.h"
|
||||
|
|
@ -38,7 +38,7 @@ DlgConnect::DlgConnect(QWidget *parent) : QDialog(parent)
|
|||
previousHosts = new QComboBox(this);
|
||||
|
||||
btnDeleteServer = new QPushButton(this);
|
||||
btnDeleteServer->setIcon(themePixmap(QStringLiteral("icons/remove_row")));
|
||||
btnDeleteServer->setIcon(loadThemedIcon(QStringLiteral("icons/remove_row")));
|
||||
btnDeleteServer->setToolTip(tr("Delete the currently selected saved server"));
|
||||
btnDeleteServer->setFixedWidth(30);
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ DlgConnect::DlgConnect(QWidget *parent) : QDialog(parent)
|
|||
|
||||
hps = new HandlePublicServers(this);
|
||||
btnRefreshServers = new QPushButton(this);
|
||||
btnRefreshServers->setIcon(themePixmap(QStringLiteral("icons/sync")));
|
||||
btnRefreshServers->setIcon(loadThemedIcon(QStringLiteral("icons/sync")));
|
||||
btnRefreshServers->setToolTip(tr("Refresh the server list with known public servers"));
|
||||
btnRefreshServers->setFixedWidth(30);
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ DlgConnect::DlgConnect(QWidget *parent) : QDialog(parent)
|
|||
updateDisplayInfo(previousHosts->currentText());
|
||||
|
||||
btnForgotPassword = new QPushButton(this);
|
||||
btnForgotPassword->setIcon(themePixmap(QStringLiteral("icons/forgot_password")));
|
||||
btnForgotPassword->setIcon(loadThemedIcon(QStringLiteral("icons/forgot_password")));
|
||||
btnForgotPassword->setToolTip(tr("Reset Password"));
|
||||
btnForgotPassword->setFixedWidth(30);
|
||||
connect(btnForgotPassword, &QPushButton::released, this, &DlgConnect::actForgotPassword);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "dlg_edit_tokens.h"
|
||||
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../interface/widgets/utility/get_text_with_max.h"
|
||||
#include "card_database_display_model.h"
|
||||
#include "libcockatrice/card/card_info.h"
|
||||
|
|
@ -108,10 +108,10 @@ DlgEditTokens::DlgEditTokens(QWidget *parent) : QDialog(parent), currentCard(nul
|
|||
&DlgEditTokens::tokenSelectionChanged);
|
||||
|
||||
QAction *aAddToken = new QAction(tr("Add token"), this);
|
||||
aAddToken->setIcon(themePixmap(QStringLiteral("icons/increment")));
|
||||
aAddToken->setIcon(loadThemedIcon(QStringLiteral("icons/increment")));
|
||||
connect(aAddToken, &QAction::triggered, this, &DlgEditTokens::actAddToken);
|
||||
QAction *aRemoveToken = new QAction(tr("Remove token"), this);
|
||||
aRemoveToken->setIcon(themePixmap(QStringLiteral("icons/decrement")));
|
||||
aRemoveToken->setIcon(loadThemedIcon(QStringLiteral("icons/decrement")));
|
||||
connect(aRemoveToken, &QAction::triggered, this, &DlgEditTokens::actRemoveToken);
|
||||
|
||||
auto *databaseToolBar = new QToolBar;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "dlg_manage_sets.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../interface/card_picture_loader/card_picture_loader.h"
|
||||
#include "../interface/widgets/utility/custom_line_edit.h"
|
||||
#include "libcockatrice/card/database/card_database.h"
|
||||
|
|
@ -58,28 +58,28 @@ WndSets::WndSets(QWidget *parent) : QMainWindow(parent)
|
|||
setsEditToolBar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||
|
||||
aTop = new QAction(QString(), this);
|
||||
aTop->setIcon(themePixmap(QStringLiteral("icons/arrow_top_green")));
|
||||
aTop->setIcon(loadThemedIcon(QStringLiteral("icons/arrow_to_top")));
|
||||
aTop->setToolTip(tr("Move selected set to the top"));
|
||||
aTop->setEnabled(false);
|
||||
connect(aTop, &QAction::triggered, this, &WndSets::actTop);
|
||||
setsEditToolBar->addAction(aTop);
|
||||
|
||||
aUp = new QAction(QString(), this);
|
||||
aUp->setIcon(themePixmap(QStringLiteral("icons/arrow_up_green")));
|
||||
aUp->setIcon(loadThemedIcon(QStringLiteral("icons/arrow_up")));
|
||||
aUp->setToolTip(tr("Move selected set up"));
|
||||
aUp->setEnabled(false);
|
||||
connect(aUp, &QAction::triggered, this, &WndSets::actUp);
|
||||
setsEditToolBar->addAction(aUp);
|
||||
|
||||
aDown = new QAction(QString(), this);
|
||||
aDown->setIcon(themePixmap(QStringLiteral("icons/arrow_down_green")));
|
||||
aDown->setIcon(loadThemedIcon(QStringLiteral("icons/arrow_down")));
|
||||
aDown->setToolTip(tr("Move selected set down"));
|
||||
aDown->setEnabled(false);
|
||||
connect(aDown, &QAction::triggered, this, &WndSets::actDown);
|
||||
setsEditToolBar->addAction(aDown);
|
||||
|
||||
aBottom = new QAction(QString(), this);
|
||||
aBottom->setIcon(themePixmap(QStringLiteral("icons/arrow_bottom_green")));
|
||||
aBottom->setIcon(loadThemedIcon(QStringLiteral("icons/arrow_to_bottom")));
|
||||
aBottom->setToolTip(tr("Move selected set to the bottom"));
|
||||
aBottom->setEnabled(false);
|
||||
connect(aBottom, &QAction::triggered, this, &WndSets::actBottom);
|
||||
|
|
@ -89,7 +89,7 @@ WndSets::WndSets(QWidget *parent) : QMainWindow(parent)
|
|||
searchField = new LineEditUnfocusable;
|
||||
searchField->setObjectName("searchEdit");
|
||||
searchField->setPlaceholderText(tr("Search by set name, code, type, or release date"));
|
||||
searchField->addAction(themePixmap(QStringLiteral("icons/search")), LineEditUnfocusable::LeadingPosition);
|
||||
searchField->addAction(loadThemedIcon(QStringLiteral("icons/search")), LineEditUnfocusable::LeadingPosition);
|
||||
searchField->setClearButtonEnabled(true);
|
||||
setFocusProxy(searchField);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "dlg_register.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../server/handle_public_servers.h"
|
||||
#include "../server/user/user_info_connection.h"
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ DlgRegister::DlgRegister(QWidget *parent) : QDialog(parent)
|
|||
previousHosts = new QComboBox(this);
|
||||
|
||||
btnDeleteServer = new QPushButton(this);
|
||||
btnDeleteServer->setIcon(themePixmap(QStringLiteral("icons/remove_row")));
|
||||
btnDeleteServer->setIcon(loadThemedIcon(QStringLiteral("icons/remove_row")));
|
||||
btnDeleteServer->setToolTip(tr("Delete the currently selected saved server"));
|
||||
btnDeleteServer->setFixedWidth(30);
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ DlgRegister::DlgRegister(QWidget *parent) : QDialog(parent)
|
|||
|
||||
hps = new HandlePublicServers(this);
|
||||
btnRefreshServers = new QPushButton(this);
|
||||
btnRefreshServers->setIcon(themePixmap(QStringLiteral("icons/sync")));
|
||||
btnRefreshServers->setIcon(loadThemedIcon(QStringLiteral("icons/sync")));
|
||||
btnRefreshServers->setToolTip(tr("Refresh the server list with known public servers"));
|
||||
btnRefreshServers->setFixedWidth(30);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include "settings_view.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../interface/theme_manager.h"
|
||||
#include "../settings_page/abstract_settings_page.h"
|
||||
#include "../settings_page/appearance_settings_page.h"
|
||||
|
|
@ -135,7 +135,7 @@ void SettingsView::setupUi()
|
|||
// Search bar
|
||||
searchEdit = new QLineEdit;
|
||||
searchEdit->setClearButtonEnabled(true);
|
||||
searchEdit->addAction(themePixmap(QStringLiteral("icons/search")), QLineEdit::LeadingPosition);
|
||||
searchEdit->addAction(loadThemedIcon(QStringLiteral("icons/search")), QLineEdit::LeadingPosition);
|
||||
searchEdit->installEventFilter(this);
|
||||
connect(searchEdit, &QLineEdit::textChanged, this, &SettingsView::onSearchTextChanged);
|
||||
searchEdit->setObjectName("settingsSearchEdit");
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#include "settings_button_widget.h"
|
||||
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "settings_popup_widget.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QHBoxLayout>
|
||||
#include <QIcon>
|
||||
#include <QMouseEvent>
|
||||
#include <QPixmap>
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QRect>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
SettingsButtonWidget::SettingsButtonWidget(QWidget *parent)
|
||||
: QWidget(parent), button(new QToolButton(this)), popup(new SettingsPopupWidget(nullptr))
|
||||
{
|
||||
button->setIcon(themePixmap(QStringLiteral("icons/cogwheel")));
|
||||
button->setIcon(loadThemedIcon(QStringLiteral("icons/settings")));
|
||||
button->setCheckable(true);
|
||||
button->setFixedSize(32, 32);
|
||||
connect(button, &QToolButton::clicked, this, &SettingsButtonWidget::togglePopup);
|
||||
|
|
@ -49,9 +49,9 @@ void SettingsButtonWidget::removeSettingsWidget(QWidget *toRemove) const
|
|||
popup->removeSettingsWidget(toRemove);
|
||||
}
|
||||
|
||||
void SettingsButtonWidget::setButtonIcon(QPixmap iconMap)
|
||||
void SettingsButtonWidget::setButtonIcon(const QIcon &icon)
|
||||
{
|
||||
button->setIcon(iconMap);
|
||||
button->setIcon(icon);
|
||||
}
|
||||
|
||||
void SettingsButtonWidget::setButtonText(const QString &text)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <qtmetamacros.h>
|
||||
|
||||
class QHBoxLayout;
|
||||
class QPixmap;
|
||||
class QIcon;
|
||||
class QToolButton;
|
||||
class SettingsPopupWidget;
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ public:
|
|||
|
||||
void addSettingsWidget(QWidget *toAdd) const;
|
||||
void removeSettingsWidget(QWidget *toRemove) const;
|
||||
void setButtonIcon(QPixmap iconMap);
|
||||
void setButtonIcon(const QIcon &icon);
|
||||
void setButtonText(const QString &buttonText);
|
||||
void setCompact(bool compact);
|
||||
bool isCompact() const
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "game_selector.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../interface/widgets/dialogs/dlg_create_game.h"
|
||||
#include "../interface/widgets/dialogs/dlg_filter_games.h"
|
||||
#include "../interface/widgets/tabs/tab_room.h"
|
||||
|
|
@ -130,10 +130,10 @@ GameSelector::GameSelector(AbstractClient *_client,
|
|||
}
|
||||
|
||||
filterButton = new QPushButton;
|
||||
filterButton->setIcon(themePixmap(QStringLiteral("icons/search")));
|
||||
filterButton->setIcon(loadThemedIcon(QStringLiteral("icons/search")));
|
||||
connect(filterButton, &QPushButton::clicked, this, &GameSelector::actSetFilter);
|
||||
clearFilterButton = new QPushButton;
|
||||
clearFilterButton->setIcon(themePixmap(QStringLiteral("icons/clearsearch")));
|
||||
clearFilterButton->setIcon(loadThemedIcon(QStringLiteral("icons/clearsearch")));
|
||||
bool filtersSetToDefault = showFilters && gameListProxyModel->areFilterParametersSetToDefaults();
|
||||
clearFilterButton->setEnabled(!filtersSetToDefault);
|
||||
connect(clearFilterButton, &QPushButton::clicked, this, &GameSelector::actClearFilter);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "games_model.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../interface/pixel_map_generator.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_user.pb.h"
|
||||
#include "user/user_list_proxy.h"
|
||||
|
|
@ -85,7 +86,8 @@ const QString GamesModel::getGameCreatedString(const int secs)
|
|||
}
|
||||
|
||||
GamesModel::GamesModel(const QMap<int, QString> &_rooms, const QMap<int, GameTypeMap> &_gameTypes, QObject *parent)
|
||||
: QAbstractTableModel(parent), rooms(_rooms), gameTypes(_gameTypes)
|
||||
: QAbstractTableModel(parent), rooms(_rooms), gameTypes(_gameTypes),
|
||||
lockIcon(loadThemedIcon(QStringLiteral("icons/lock")))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -191,7 +193,9 @@ QVariant GamesModel::data(const QModelIndex &index, int role) const
|
|||
return result.join(", ");
|
||||
}
|
||||
case Qt::DecorationRole: {
|
||||
return gameentry.with_password() ? QIcon(LockPixmapGenerator::generatePixmap(13)) : QVariant();
|
||||
// One engine per model: it is palette- and theme-aware and
|
||||
// invalidates itself, so a repaint must not build a new one.
|
||||
return gameentry.with_password() ? lockIcon : QVariant();
|
||||
case Qt::TextAlignmentRole:
|
||||
return Qt::AlignLeft;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include "game_type_map.h"
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
#include <QIcon>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QModelIndex>
|
||||
|
|
@ -32,6 +33,7 @@ private:
|
|||
QList<ServerInfo_Game> gameList; /**< List of games currently displayed. */
|
||||
QMap<int, QString> rooms; /**< Map of room IDs to room names. */
|
||||
QMap<int, GameTypeMap> gameTypes; /**< Map of room IDs to available game types. */
|
||||
QIcon lockIcon; /**< Themed lock for password-protected games. */
|
||||
|
||||
static const int NUM_COLS = 8; /**< Number of columns in the table. */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "remote_replay_list_tree_widget.h"
|
||||
|
||||
#include "../../../pixel_map_generator.h"
|
||||
#include "../../../theme_icon.h"
|
||||
#include "libcockatrice/protocol/pb/response.pb.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_replay_match.pb.h"
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ RemoteReplayList_TreeModel::RemoteReplayList_TreeModel(AbstractClient *_client,
|
|||
QFileIconProvider fip;
|
||||
dirIcon = fip.icon(QFileIconProvider::Folder);
|
||||
fileIcon = fip.icon(QFileIconProvider::File);
|
||||
lockIcon = themePixmap(QStringLiteral("icons/lock"));
|
||||
lockIcon = loadThemedIcon(QStringLiteral("icons/lock"));
|
||||
}
|
||||
|
||||
RemoteReplayList_TreeModel::~RemoteReplayList_TreeModel()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "deck_editor_settings_page.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../dialogs/path_safety_warning.h"
|
||||
#include "update/card_spoiler/spoiler_background_updater.h"
|
||||
|
||||
|
|
@ -80,19 +80,19 @@ DeckEditorSettingsPage::DeckEditorSettingsPage()
|
|||
}
|
||||
|
||||
aAdd = new QAction(this);
|
||||
aAdd->setIcon(themePixmap(QStringLiteral("icons/increment")));
|
||||
aAdd->setIcon(loadThemedIcon(QStringLiteral("icons/increment")));
|
||||
connect(aAdd, &QAction::triggered, this, &DeckEditorSettingsPage::actAddURL);
|
||||
|
||||
aEdit = new QAction(this);
|
||||
aEdit->setIcon(themePixmap(QStringLiteral("icons/pencil")));
|
||||
aEdit->setIcon(loadThemedIcon(QStringLiteral("icons/pencil")));
|
||||
connect(aEdit, &QAction::triggered, this, &DeckEditorSettingsPage::actEditURL);
|
||||
|
||||
aRemove = new QAction(this);
|
||||
aRemove->setIcon(themePixmap(QStringLiteral("icons/decrement")));
|
||||
aRemove->setIcon(loadThemedIcon(QStringLiteral("icons/decrement")));
|
||||
connect(aRemove, &QAction::triggered, this, &DeckEditorSettingsPage::actRemoveURL);
|
||||
|
||||
aRateLimit = new QAction(this);
|
||||
aRateLimit->setIcon(themePixmap(QStringLiteral("icons/cogwheel")));
|
||||
aRateLimit->setIcon(loadThemedIcon(QStringLiteral("icons/settings")));
|
||||
connect(aRateLimit, &QAction::triggered, this, &DeckEditorSettingsPage::actAdjustRateLimit);
|
||||
|
||||
auto *urlToolBar = new QToolBar;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "messages_settings_page.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../interface/widgets/utility/get_text_with_max.h"
|
||||
#include "libcockatrice/utility/macros.h"
|
||||
|
||||
|
|
@ -146,15 +146,15 @@ MessagesSettingsPage::MessagesSettingsPage()
|
|||
}
|
||||
|
||||
aAdd = new QAction(this);
|
||||
aAdd->setIcon(themePixmap(QStringLiteral("icons/increment")));
|
||||
aAdd->setIcon(loadThemedIcon(QStringLiteral("icons/increment")));
|
||||
connect(aAdd, &QAction::triggered, this, &MessagesSettingsPage::actAdd);
|
||||
|
||||
aEdit = new QAction(this);
|
||||
aEdit->setIcon(themePixmap(QStringLiteral("icons/pencil")));
|
||||
aEdit->setIcon(loadThemedIcon(QStringLiteral("icons/pencil")));
|
||||
connect(aEdit, &QAction::triggered, this, &MessagesSettingsPage::actEdit);
|
||||
|
||||
aRemove = new QAction(this);
|
||||
aRemove->setIcon(themePixmap(QStringLiteral("icons/decrement")));
|
||||
aRemove->setIcon(loadThemedIcon(QStringLiteral("icons/decrement")));
|
||||
connect(aRemove, &QAction::triggered, this, &MessagesSettingsPage::actRemove);
|
||||
|
||||
auto *messageToolBar = new QToolBar;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcut_treeview.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../interface/widgets/utility/custom_line_edit.h"
|
||||
#include "../interface/widgets/utility/sequence_edit.h"
|
||||
|
||||
|
|
@ -58,8 +58,8 @@ ShortcutSettingsPage::ShortcutSettingsPage()
|
|||
btnResetAll = new QPushButton(this);
|
||||
btnClearAll = new QPushButton(this);
|
||||
|
||||
btnResetAll->setIcon(themePixmap(QStringLiteral("icons/update")));
|
||||
btnClearAll->setIcon(themePixmap(QStringLiteral("icons/clearsearch")));
|
||||
btnResetAll->setIcon(loadThemedIcon(QStringLiteral("icons/reload")));
|
||||
btnClearAll->setIcon(loadThemedIcon(QStringLiteral("icons/clearsearch")));
|
||||
|
||||
// layout
|
||||
auto *_editLayout = new QGridLayout;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "tab_archidekt.h"
|
||||
|
||||
#include "../../../../../client/settings/cache_settings.h"
|
||||
#include "../../../../pixel_map_generator.h"
|
||||
#include "../../../../theme_icon.h"
|
||||
#include "../../../cards/additional_info/mana_symbol_widget.h"
|
||||
#include "../../../cards/card_size_widget.h"
|
||||
#include "../../../quick_settings/settings_button_widget.h"
|
||||
|
|
@ -282,7 +282,7 @@ void TabArchidekt::setupFilterWidgets()
|
|||
// Format filter (collapsible)
|
||||
formatButton = new SettingsButtonWidget(secondaryToolbar);
|
||||
formatButton->setButtonText(tr("Formats"));
|
||||
formatButton->setButtonIcon(themePixmap(QStringLiteral("icons/scale_balanced")));
|
||||
formatButton->setButtonIcon(loadThemedIcon(QStringLiteral("icons/scales")));
|
||||
|
||||
QWidget *formatContainer = new QWidget(secondaryToolbar);
|
||||
QGridLayout *formatLayout = new QGridLayout(formatContainer);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "commander_bracket_widget.h"
|
||||
|
||||
#include "../../../../../client/settings/cache_settings.h"
|
||||
#include "../../../../pixel_map_generator.h"
|
||||
#include "../../../../theme_icon.h"
|
||||
#include "commander_bracket_service.h"
|
||||
#include "libcockatrice/deck_list/deck_list.h"
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ CommanderBracketWidget::CommanderBracketWidget(QWidget *parent) : QWidget(parent
|
|||
bracketInfoButton->setEnabled(false);
|
||||
|
||||
bracketRefreshButton = new QToolButton(this);
|
||||
bracketRefreshButton->setIcon(themePixmap(QStringLiteral("icons/reload")));
|
||||
bracketRefreshButton->setIcon(loadThemedIcon(QStringLiteral("icons/reload")));
|
||||
bracketRefreshButton->setAutoRaise(true);
|
||||
|
||||
connect(bracketRefreshButton, &QToolButton::clicked, this, &CommanderBracketWidget::requestBracketEstimate);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../deck_loader/deck_loader.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../cards/additional_info/deck_color_identity.h"
|
||||
#include "../deck_share/deck_share_utils.h"
|
||||
#include "../deck_share/share_bar_widget.h"
|
||||
|
|
@ -187,19 +187,19 @@ TabDeckStorage::TabDeckStorage(TabSupervisor *_tabSupervisor,
|
|||
|
||||
// Left side actions
|
||||
aOpenLocalDeck = new QAction(this);
|
||||
aOpenLocalDeck->setIcon(themePixmap(QStringLiteral("icons/pencil")));
|
||||
aOpenLocalDeck->setIcon(loadThemedIcon(QStringLiteral("icons/pencil")));
|
||||
connect(aOpenLocalDeck, &QAction::triggered, this, &TabDeckStorage::actOpenLocalDeck);
|
||||
aRenameLocal = new QAction(this);
|
||||
aRenameLocal->setIcon(themePixmap(QStringLiteral("icons/rename")));
|
||||
aRenameLocal->setIcon(loadThemedIcon(QStringLiteral("icons/rename")));
|
||||
connect(aRenameLocal, &QAction::triggered, this, &TabDeckStorage::actRenameLocal);
|
||||
aUpload = new QAction(this);
|
||||
aUpload->setIcon(themePixmap(QStringLiteral("icons/arrow_right_green")));
|
||||
aUpload->setIcon(loadThemedIcon(QStringLiteral("icons/arrow_right")));
|
||||
connect(aUpload, &QAction::triggered, this, &TabDeckStorage::actUpload);
|
||||
aNewLocalFolder = new QAction(this);
|
||||
aNewLocalFolder->setIcon(qApp->style()->standardIcon(QStyle::SP_FileDialogNewFolder));
|
||||
connect(aNewLocalFolder, &QAction::triggered, this, &TabDeckStorage::actNewLocalFolder);
|
||||
aDeleteLocalDeck = new QAction(this);
|
||||
aDeleteLocalDeck->setIcon(themePixmap(QStringLiteral("icons/remove_row")));
|
||||
aDeleteLocalDeck->setIcon(loadThemedIcon(QStringLiteral("icons/remove_row")));
|
||||
connect(aDeleteLocalDeck, &QAction::triggered, this, &TabDeckStorage::actDeleteLocalDeck);
|
||||
|
||||
aOpenDecksFolder = new QAction(this);
|
||||
|
|
@ -208,24 +208,24 @@ TabDeckStorage::TabDeckStorage(TabSupervisor *_tabSupervisor,
|
|||
|
||||
// Right side actions
|
||||
aOpenRemoteDeck = new QAction(this);
|
||||
aOpenRemoteDeck->setIcon(themePixmap(QStringLiteral("icons/pencil")));
|
||||
aOpenRemoteDeck->setIcon(loadThemedIcon(QStringLiteral("icons/pencil")));
|
||||
connect(aOpenRemoteDeck, &QAction::triggered, this, &TabDeckStorage::actOpenRemoteDeck);
|
||||
aDownload = new QAction(this);
|
||||
aDownload->setIcon(themePixmap(QStringLiteral("icons/arrow_left_green")));
|
||||
aDownload->setIcon(loadThemedIcon(QStringLiteral("icons/arrow_left")));
|
||||
connect(aDownload, &QAction::triggered, this, &TabDeckStorage::actDownload);
|
||||
aNewFolder = new QAction(this);
|
||||
aNewFolder->setIcon(qApp->style()->standardIcon(QStyle::SP_FileDialogNewFolder));
|
||||
connect(aNewFolder, &QAction::triggered, this, &TabDeckStorage::actNewFolder);
|
||||
aDeleteRemoteDeck = new QAction(this);
|
||||
aDeleteRemoteDeck->setIcon(themePixmap(QStringLiteral("icons/remove_row")));
|
||||
aDeleteRemoteDeck->setIcon(loadThemedIcon(QStringLiteral("icons/remove_row")));
|
||||
connect(aDeleteRemoteDeck, &QAction::triggered, this, &TabDeckStorage::actDeleteRemoteDeck);
|
||||
|
||||
aShareDecks = new QAction(this);
|
||||
aShareDecks->setIcon(themePixmap(QStringLiteral("icons/share")));
|
||||
aShareDecks->setIcon(loadThemedIcon(QStringLiteral("icons/share")));
|
||||
connect(aShareDecks, &QAction::triggered, this, &TabDeckStorage::actShareDecks);
|
||||
|
||||
aPublishDeck = new QAction(this);
|
||||
aPublishDeck->setIcon(QPixmap("theme:icons/lock"));
|
||||
aPublishDeck->setIcon(loadThemedIcon(QStringLiteral("icons/lock")));
|
||||
connect(aPublishDeck, &QAction::triggered, this, &TabDeckStorage::actPublishDeck);
|
||||
|
||||
// Add actions to toolbars
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../deck_loader/deck_loader.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../cards/card_size_widget.h"
|
||||
#include "../general/layout_containers/flow_widget.h"
|
||||
#include "../interface/theme_manager.h"
|
||||
|
|
@ -63,8 +64,8 @@ TabPublicDecks::TabPublicDecks(TabSupervisor *_tabSupervisor, AbstractClient *_c
|
|||
headerLayout->addStretch(1);
|
||||
|
||||
// Filter/toolbar row, matching the Visual Deck Storage: color identity filter
|
||||
// first, the search bar stretching in the middle, and the quick settings
|
||||
// cogwheel at the end. The card size slider lives inside the cogwheel popup.
|
||||
// first, the search bar stretching in the middle, and the quick-settings button
|
||||
// at the end. The card size slider lives inside its popup.
|
||||
emptyLabel = new QLabel(tr("This user has not published any decks."), this);
|
||||
emptyLabel->setAlignment(Qt::AlignCenter);
|
||||
emptyLabel->setVisible(false);
|
||||
|
|
@ -79,7 +80,7 @@ TabPublicDecks::TabPublicDecks(TabSupervisor *_tabSupervisor, AbstractClient *_c
|
|||
colorIdentityFilter = new DeckPreviewColorIdentityFilterWidget(this);
|
||||
searchWidget = new VisualDeckStorageSearchWidget(this);
|
||||
refreshButton = new QToolButton(this);
|
||||
refreshButton->setIcon(QPixmap("theme:icons/reload"));
|
||||
refreshButton->setIcon(loadThemedIcon(QStringLiteral("icons/reload")));
|
||||
refreshButton->setFixedSize(32, 32);
|
||||
quickSettingsWidget = new VisualDeckStorageQuickSettingsWidget(this);
|
||||
quickSettingsWidget->setPublicDecksMode(true);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "tab_replays.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../interface/widgets/server/remote/remote_replay_list_tree_widget.h"
|
||||
#include "libcockatrice/protocol/pb/commands.pb.h"
|
||||
#include "libcockatrice/protocol/pb/serverinfo_replay.pb.h"
|
||||
|
|
@ -145,17 +145,17 @@ QGroupBox *TabReplays::createLeftLayout()
|
|||
|
||||
// Left side actions
|
||||
aOpenLocalReplay = new QAction(this);
|
||||
aOpenLocalReplay->setIcon(themePixmap(QStringLiteral("icons/view")));
|
||||
aOpenLocalReplay->setIcon(loadThemedIcon(QStringLiteral("icons/view")));
|
||||
connect(aOpenLocalReplay, &QAction::triggered, this, &TabReplays::actOpenLocalReplay);
|
||||
connect(localDirView, &QTreeView::doubleClicked, this, &TabReplays::actOpenLocalReplay);
|
||||
aRenameLocal = new QAction(this);
|
||||
aRenameLocal->setIcon(themePixmap(QStringLiteral("icons/rename")));
|
||||
aRenameLocal->setIcon(loadThemedIcon(QStringLiteral("icons/rename")));
|
||||
connect(aRenameLocal, &QAction::triggered, this, &TabReplays::actRenameLocal);
|
||||
aNewLocalFolder = new QAction(this);
|
||||
aNewLocalFolder->setIcon(qApp->style()->standardIcon(QStyle::SP_FileDialogNewFolder));
|
||||
connect(aNewLocalFolder, &QAction::triggered, this, &TabReplays::actNewLocalFolder);
|
||||
aDeleteLocalReplay = new QAction(this);
|
||||
aDeleteLocalReplay->setIcon(themePixmap(QStringLiteral("icons/remove_row")));
|
||||
aDeleteLocalReplay->setIcon(loadThemedIcon(QStringLiteral("icons/remove_row")));
|
||||
connect(aDeleteLocalReplay, &QAction::triggered, this, &TabReplays::actDeleteLocalReplay);
|
||||
|
||||
aOpenReplaysFolder = new QAction(this);
|
||||
|
|
@ -207,24 +207,24 @@ QGroupBox *TabReplays::createRightLayout()
|
|||
|
||||
// Right side actions
|
||||
aOpenRemoteReplay = new QAction(this);
|
||||
aOpenRemoteReplay->setIcon(themePixmap(QStringLiteral("icons/view")));
|
||||
aOpenRemoteReplay->setIcon(loadThemedIcon(QStringLiteral("icons/view")));
|
||||
connect(aOpenRemoteReplay, &QAction::triggered, this, &TabReplays::actOpenRemoteReplay);
|
||||
connect(serverDirView, &QTreeView::doubleClicked, this, &TabReplays::actOpenRemoteReplay);
|
||||
aDownload = new QAction(this);
|
||||
aDownload->setIcon(themePixmap(QStringLiteral("icons/arrow_left_green")));
|
||||
aDownload->setIcon(loadThemedIcon(QStringLiteral("icons/arrow_left")));
|
||||
connect(aDownload, &QAction::triggered, this, &TabReplays::actDownload);
|
||||
aKeep = new QAction(this);
|
||||
aKeep->setIcon(themePixmap(QStringLiteral("icons/lock")));
|
||||
aKeep->setIcon(loadThemedIcon(QStringLiteral("icons/lock")));
|
||||
connect(aKeep, &QAction::triggered, this, &TabReplays::actKeepRemoteReplay);
|
||||
aDeleteRemoteReplay = new QAction(this);
|
||||
aDeleteRemoteReplay->setIcon(themePixmap(QStringLiteral("icons/remove_row")));
|
||||
aDeleteRemoteReplay->setIcon(loadThemedIcon(QStringLiteral("icons/remove_row")));
|
||||
connect(aDeleteRemoteReplay, &QAction::triggered, this, &TabReplays::actDeleteRemoteReplay);
|
||||
aGetReplayCode = new QAction(this);
|
||||
aGetReplayCode->setIcon(themePixmap(QStringLiteral("icons/share")));
|
||||
aGetReplayCode->setIcon(loadThemedIcon(QStringLiteral("icons/share")));
|
||||
connect(aGetReplayCode, &QAction::triggered, this, &TabReplays::actGetReplayCode);
|
||||
|
||||
aSubmitReplayCode = new QAction(this);
|
||||
aSubmitReplayCode->setIcon(themePixmap(QStringLiteral("icons/search")));
|
||||
aSubmitReplayCode->setIcon(loadThemedIcon(QStringLiteral("icons/search")));
|
||||
connect(aSubmitReplayCode, &QAction::triggered, this, &TabReplays::actSubmitReplayCode);
|
||||
|
||||
// Add actions to toolbars
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../interface/widgets/dialogs/dlg_settings.h"
|
||||
#include "../interface/widgets/server/chat_view/chat_view.h"
|
||||
#include "../interface/widgets/server/game_link.h"
|
||||
|
|
@ -198,7 +198,7 @@ TabRoom::TabRoom(TabSupervisor *_tabSupervisor,
|
|||
connect(aOpenChatSettings, &QAction::triggered, this, &TabRoom::actOpenChatSettings);
|
||||
|
||||
auto *chatSettingsButton = new QToolButton;
|
||||
chatSettingsButton->setIcon(themePixmap(QStringLiteral("icons/settings")));
|
||||
chatSettingsButton->setIcon(loadThemedIcon(QStringLiteral("icons/settings")));
|
||||
chatSettingsButton->setMenu(chatSettingsMenu);
|
||||
chatSettingsButton->setPopupMode(QToolButton::InstantPopup);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "../../intents/contexts/context_join_room.h"
|
||||
#include "../../intents/intent.h"
|
||||
#include "../../intents/intent_join_server_game.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../interface/pixel_map_generator.h"
|
||||
#include "../interface/widgets/server/game_link.h"
|
||||
#include "../interface/widgets/server/user/user_list_manager.h"
|
||||
|
|
@ -1360,7 +1361,7 @@ void TabSupervisor::tabUserEvent(bool globalEvent)
|
|||
auto *tab = static_cast<Tab *>(sender());
|
||||
if (tab != currentWidget()) {
|
||||
tab->setContentsChanged(true);
|
||||
setTabIcon(indexOf(tab), themePixmap(QStringLiteral("icons/tab_changed")));
|
||||
setTabIcon(indexOf(tab), loadThemedIcon(QStringLiteral("icons/tab_changed")));
|
||||
}
|
||||
if (globalEvent && SettingsCache::instance().userInterface().getNotificationsEnabled()) {
|
||||
QApplication::alert(this);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../../client/settings/shortcuts_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QEvent>
|
||||
|
|
@ -24,8 +24,8 @@ SequenceEdit::SequenceEdit(const QString &_shortcutName, QWidget *parent) : QWid
|
|||
defaultButton = new QPushButton("", this);
|
||||
|
||||
lineEdit->setMinimumWidth(70);
|
||||
clearButton->setIcon(themePixmap(QStringLiteral("icons/clearsearch")));
|
||||
defaultButton->setIcon(themePixmap(QStringLiteral("icons/update")));
|
||||
clearButton->setIcon(loadThemedIcon(QStringLiteral("icons/clearsearch")));
|
||||
defaultButton->setIcon(loadThemedIcon(QStringLiteral("icons/reload")));
|
||||
|
||||
auto *layout = QtUtils::makeLayout<QHBoxLayout>(this, 1);
|
||||
layout->addWidget(lineEdit);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "visual_database_display_filter_toolbar_widget.h"
|
||||
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../deck_editor/card_database_view.h"
|
||||
#include "../quick_settings/settings_button_widget.h"
|
||||
#include "card_database_display_model.h"
|
||||
|
|
@ -45,13 +45,13 @@ VisualDatabaseDisplayFilterToolbarWidget::VisualDatabaseDisplayFilterToolbarWidg
|
|||
sortGroupBox = new QGroupBox(this);
|
||||
filterGroupBox = new QGroupBox(this);
|
||||
|
||||
auto scalePixmap = [](const QString &fileName) { return QIcon(QPixmap(fileName)).pixmap({20, 20}); };
|
||||
auto scalePixmap = [](const QString &prefix) { return loadThemedIcon(prefix).pixmap({20, 20}); };
|
||||
|
||||
sortByLabel = new QLabel(this);
|
||||
sortByLabel->setPixmap(scalePixmap("theme:icons/sort_arrow_down"));
|
||||
sortByLabel->setPixmap(scalePixmap("icons/sort_arrow_down"));
|
||||
|
||||
filterByLabel = new QLabel(this);
|
||||
filterByLabel->setPixmap(scalePixmap("theme:icons/filter"));
|
||||
filterByLabel->setPixmap(scalePixmap("icons/filter"));
|
||||
|
||||
sortColumnCombo = new QComboBox(this);
|
||||
sortColumnCombo->setSizeAdjustPolicy(QComboBox::SizeAdjustPolicy::AdjustToContents);
|
||||
|
|
@ -89,22 +89,22 @@ VisualDatabaseDisplayFilterToolbarWidget::VisualDatabaseDisplayFilterToolbarWidg
|
|||
});
|
||||
|
||||
quickFilterSaveLoadWidget = new SettingsButtonWidget(this);
|
||||
quickFilterSaveLoadWidget->setButtonIcon(themePixmap(QStringLiteral("icons/floppy_disk")));
|
||||
quickFilterSaveLoadWidget->setButtonIcon(loadThemedIcon(QStringLiteral("icons/floppy_disk")));
|
||||
|
||||
quickFilterNameWidget = new SettingsButtonWidget(this);
|
||||
quickFilterNameWidget->setButtonIcon(themePixmap(QStringLiteral("icons/pen_to_square")));
|
||||
quickFilterNameWidget->setButtonIcon(loadThemedIcon(QStringLiteral("icons/pen_to_square")));
|
||||
|
||||
quickFilterMainTypeWidget = new SettingsButtonWidget(this);
|
||||
quickFilterMainTypeWidget->setButtonIcon(themePixmap(QStringLiteral("icons/circle_half_stroke")));
|
||||
quickFilterMainTypeWidget->setButtonIcon(loadThemedIcon(QStringLiteral("icons/circle_half_stroke")));
|
||||
|
||||
quickFilterSubTypeWidget = new SettingsButtonWidget(this);
|
||||
quickFilterSubTypeWidget->setButtonIcon(themePixmap(QStringLiteral("icons/dragon")));
|
||||
quickFilterSubTypeWidget->setButtonIcon(loadThemedIcon(QStringLiteral("icons/dragon")));
|
||||
|
||||
quickFilterSetWidget = new SettingsButtonWidget(this);
|
||||
quickFilterSetWidget->setButtonIcon(themePixmap(QStringLiteral("icons/scroll")));
|
||||
quickFilterSetWidget->setButtonIcon(loadThemedIcon(QStringLiteral("icons/scroll")));
|
||||
|
||||
quickFilterFormatLegalityWidget = new SettingsButtonWidget(this);
|
||||
quickFilterFormatLegalityWidget->setButtonIcon(themePixmap(QStringLiteral("icons/scale_balanced")));
|
||||
quickFilterFormatLegalityWidget->setButtonIcon(loadThemedIcon(QStringLiteral("icons/scales")));
|
||||
|
||||
retranslateUi();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
#include "../../../filters/filter_tree_model.h"
|
||||
#include "../../../filters/syntax_help.h"
|
||||
#include "../../key_signals.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../cards/card_info_picture_widget.h"
|
||||
#include "../cards/card_info_picture_with_text_overlay_widget.h"
|
||||
#include "../cards/card_size_widget.h"
|
||||
#include "../deck_editor/card_database_view.h"
|
||||
#include "../general/layout_containers/flow_widget.h"
|
||||
|
|
@ -79,8 +81,8 @@ VisualDatabaseDisplayWidget::VisualDatabaseDisplayWidget(QWidget *parent,
|
|||
searchEdit->setObjectName("searchEdit");
|
||||
searchEdit->setPlaceholderText(tr("Search by card name (or search expressions)"));
|
||||
searchEdit->setClearButtonEnabled(true);
|
||||
searchEdit->addAction(loadColorAdjustedPixmap("theme:icons/search"), QLineEdit::LeadingPosition);
|
||||
auto help = searchEdit->addAction(themePixmap(QStringLiteral("icons/info")), QLineEdit::TrailingPosition);
|
||||
searchEdit->addAction(loadThemedIcon(QStringLiteral("icons/search")), QLineEdit::LeadingPosition);
|
||||
auto help = searchEdit->addAction(loadThemedIcon(QStringLiteral("icons/info")), QLineEdit::TrailingPosition);
|
||||
connect(help, &QAction::triggered, this, [this] { createSearchSyntaxHelpWindow(searchEdit); });
|
||||
|
||||
setFocusProxy(searchEdit);
|
||||
|
|
@ -154,7 +156,7 @@ VisualDatabaseDisplayWidget::VisualDatabaseDisplayWidget(QWidget *parent,
|
|||
|
||||
clearFilterWidget = new QToolButton();
|
||||
clearFilterWidget->setFixedSize(32, 32);
|
||||
clearFilterWidget->setIcon(themePixmap(QStringLiteral("icons/delete")));
|
||||
clearFilterWidget->setIcon(loadThemedIcon(QStringLiteral("icons/delete")));
|
||||
connect(clearFilterWidget, &QToolButton::clicked, this, [this] {
|
||||
filterModel->blockSignals(true);
|
||||
filterModel->filterTree()->blockSignals(true);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "visual_deck_display_options_widget.h"
|
||||
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../deck_editor/deck_editor_deck_dock_widget.h"
|
||||
#include "../quick_settings/settings_button_widget.h"
|
||||
#include "../tabs/visual_deck_editor/tab_deck_editor_visual.h"
|
||||
|
|
@ -65,7 +65,7 @@ VisualDeckDisplayOptionsWidget::VisualDeckDisplayOptionsWidget(QWidget *parent)
|
|||
sortByLabel = new QLabel(this);
|
||||
|
||||
sortCriteriaButton = new SettingsButtonWidget(this);
|
||||
sortCriteriaButton->setButtonIcon(themePixmap(QStringLiteral("icons/sort_arrow_down")));
|
||||
sortCriteriaButton->setButtonIcon(loadThemedIcon(QStringLiteral("icons/sort_arrow_down")));
|
||||
|
||||
sortLabel = new QLabel(sortCriteriaButton);
|
||||
sortLabel->setWordWrap(true);
|
||||
|
|
@ -119,11 +119,11 @@ void VisualDeckDisplayOptionsWidget::updateDisplayTypeButton()
|
|||
switch (currentDisplayType) {
|
||||
case DisplayType::Flat:
|
||||
displayTypeButton->setButtonText(tr("Toggle Layout: Flat"));
|
||||
displayTypeButton->setButtonIcon(themePixmap(QStringLiteral("icons/scroll")));
|
||||
displayTypeButton->setButtonIcon(loadThemedIcon(QStringLiteral("icons/scroll")));
|
||||
break;
|
||||
case DisplayType::Overlap:
|
||||
displayTypeButton->setButtonText(tr("Toggle Layout: Overlap"));
|
||||
displayTypeButton->setButtonIcon(themePixmap(QStringLiteral("icons/scales")));
|
||||
displayTypeButton->setButtonIcon(loadThemedIcon(QStringLiteral("icons/scales")));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "visual_deck_editor_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "../cards/card_size_widget.h"
|
||||
#include "../cards/deck_card_zone_display_widget.h"
|
||||
#include "../general/layout_containers/flow_widget.h"
|
||||
|
|
@ -144,7 +144,7 @@ void VisualDeckEditorWidget::initializeSearchBarAndCompleter()
|
|||
|
||||
// Search button functionality
|
||||
searchPushButton = new CompactPushButton(searchContainer);
|
||||
searchPushButton->setButtonIcon(themePixmap(QStringLiteral("icons/search")));
|
||||
searchPushButton->setButtonIcon(loadThemedIcon(QStringLiteral("icons/search")));
|
||||
connect(searchPushButton, &QPushButton::clicked, this, [this] { addCardFromSearch(); });
|
||||
|
||||
searchLayout->addWidget(searchPushButton);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "visual_deck_storage_search_widget.h"
|
||||
|
||||
#include "../../../filters/syntax_help.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QHBoxLayout>
|
||||
|
|
@ -27,9 +27,9 @@ VisualDeckStorageSearchWidget::VisualDeckStorageSearchWidget(QWidget *parent) :
|
|||
searchBar = new QLineEdit(this);
|
||||
searchBar->setPlaceholderText(tr("Search by filename (or search expression)"));
|
||||
searchBar->setClearButtonEnabled(true);
|
||||
searchBar->addAction(loadColorAdjustedPixmap("theme:icons/search"), QLineEdit::LeadingPosition);
|
||||
searchBar->addAction(loadThemedIcon(QStringLiteral("icons/search")), QLineEdit::LeadingPosition);
|
||||
|
||||
auto help = searchBar->addAction(themePixmap(QStringLiteral("icons/info")), QLineEdit::TrailingPosition);
|
||||
auto help = searchBar->addAction(loadThemedIcon(QStringLiteral("icons/info")), QLineEdit::TrailingPosition);
|
||||
connect(help, &QAction::triggered, this, [this] { createDeckSearchSyntaxHelpWindow(searchBar); });
|
||||
|
||||
layout->addWidget(searchBar);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "visual_deck_storage_widget.h"
|
||||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../pixel_map_generator.h"
|
||||
#include "../../theme_icon.h"
|
||||
#include "deck_preview/deck_preview_color_identity_filter_widget.h"
|
||||
#include "deck_preview/deck_preview_widget.h"
|
||||
#include "libcockatrice/card/database/card_database.h"
|
||||
|
|
@ -62,12 +62,12 @@ VisualDeckStorageWidget::VisualDeckStorageWidget(QWidget *parent) : QWidget(pare
|
|||
searchWidget = new VisualDeckStorageSearchWidget(this);
|
||||
|
||||
refreshButton = new QToolButton(this);
|
||||
refreshButton->setIcon(themePixmap(QStringLiteral("icons/reload")));
|
||||
refreshButton->setIcon(loadThemedIcon(QStringLiteral("icons/reload")));
|
||||
refreshButton->setFixedSize(32, 32);
|
||||
connect(refreshButton, &QPushButton::clicked, this, &VisualDeckStorageWidget::refreshIfPossible);
|
||||
|
||||
shareButton = new QToolButton(this);
|
||||
shareButton->setIcon(themePixmap(QStringLiteral("icons/share")));
|
||||
shareButton->setIcon(loadThemedIcon(QStringLiteral("icons/share")));
|
||||
shareButton->setFixedSize(32, 32);
|
||||
shareButton->setVisible(false);
|
||||
connect(shareButton, &QPushButton::clicked, this, &VisualDeckStorageWidget::shareRequested);
|
||||
|
|
|
|||
|
|
@ -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