Skip to content

Commit 9848d42

Browse files
committed
Merge pull request #6487
eec7757 qt: Introduce PlatformStyle (Wladimir J. van der Laan)
2 parents 675d2fe + eec7757 commit 9848d42

37 files changed

+462
-318
lines changed

src/Makefile.qt.include

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ BITCOIN_QT_H = \
185185
qt/paymentrequestplus.h \
186186
qt/paymentserver.h \
187187
qt/peertablemodel.h \
188+
qt/platformstyle.h \
188189
qt/qvalidatedlineedit.h \
189190
qt/qvaluecombobox.h \
190191
qt/receivecoinsdialog.h \
191192
qt/receiverequestdialog.h \
192193
qt/recentrequeststablemodel.h \
193194
qt/rpcconsole.h \
194-
qt/scicon.h \
195195
qt/sendcoinsdialog.h \
196196
qt/sendcoinsentry.h \
197197
qt/signverifymessagedialog.h \
@@ -273,10 +273,10 @@ BITCOIN_QT_CPP = \
273273
qt/optionsdialog.cpp \
274274
qt/optionsmodel.cpp \
275275
qt/peertablemodel.cpp \
276+
qt/platformstyle.cpp \
276277
qt/qvalidatedlineedit.cpp \
277278
qt/qvaluecombobox.cpp \
278279
qt/rpcconsole.cpp \
279-
qt/scicon.cpp \
280280
qt/splashscreen.cpp \
281281
qt/trafficgraphwidget.cpp \
282282
qt/utilitydialog.cpp

src/init.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,9 @@ std::string HelpMessage(HelpMessageMode mode)
441441
strUsage += HelpMessageOpt("-min", _("Start minimized"));
442442
strUsage += HelpMessageOpt("-rootcertificates=<file>", _("Set SSL root certificates for payment request (default: -system-)"));
443443
strUsage += HelpMessageOpt("-splash", _("Show splash screen on startup (default: 1)"));
444+
if (showDebug) {
445+
strUsage += HelpMessageOpt("-uiplatform", "Select platform to customize UI for (one of windows, macosx, other; default: platform compiled on)");
446+
}
444447
}
445448

446449
return strUsage;

src/qt/addressbookpage.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
#include "csvmodelwriter.h"
1515
#include "editaddressdialog.h"
1616
#include "guiutil.h"
17-
#include "scicon.h"
17+
#include "platformstyle.h"
1818

1919
#include <QIcon>
2020
#include <QMenu>
2121
#include <QMessageBox>
2222
#include <QSortFilterProxyModel>
2323

24-
AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) :
24+
AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode mode, Tabs tab, QWidget *parent) :
2525
QDialog(parent),
2626
ui(new Ui::AddressBookPage),
2727
model(0),
@@ -30,17 +30,17 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) :
3030
{
3131
ui->setupUi(this);
3232

33-
#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
34-
ui->newAddress->setIcon(QIcon());
35-
ui->copyAddress->setIcon(QIcon());
36-
ui->deleteAddress->setIcon(QIcon());
37-
ui->exportButton->setIcon(QIcon());
38-
#else
39-
ui->newAddress->setIcon(SingleColorIcon(":/icons/add"));
40-
ui->copyAddress->setIcon(SingleColorIcon(":/icons/editcopy"));
41-
ui->deleteAddress->setIcon(SingleColorIcon(":/icons/remove"));
42-
ui->exportButton->setIcon(SingleColorIcon(":/icons/export"));
43-
#endif
33+
if (!platformStyle->getImagesOnButtons()) {
34+
ui->newAddress->setIcon(QIcon());
35+
ui->copyAddress->setIcon(QIcon());
36+
ui->deleteAddress->setIcon(QIcon());
37+
ui->exportButton->setIcon(QIcon());
38+
} else {
39+
ui->newAddress->setIcon(platformStyle->SingleColorIcon(":/icons/add"));
40+
ui->copyAddress->setIcon(platformStyle->SingleColorIcon(":/icons/editcopy"));
41+
ui->deleteAddress->setIcon(platformStyle->SingleColorIcon(":/icons/remove"));
42+
ui->exportButton->setIcon(platformStyle->SingleColorIcon(":/icons/export"));
43+
}
4444

4545
switch(mode)
4646
{

src/qt/addressbookpage.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
class AddressTableModel;
1111
class OptionsModel;
12+
class PlatformStyle;
1213

1314
namespace Ui {
1415
class AddressBookPage;
@@ -39,7 +40,7 @@ class AddressBookPage : public QDialog
3940
ForEditing /**< Open address book for editing */
4041
};
4142

42-
explicit AddressBookPage(Mode mode, Tabs tab, QWidget *parent);
43+
explicit AddressBookPage(const PlatformStyle *platformStyle, Mode mode, Tabs tab, QWidget *parent);
4344
~AddressBookPage();
4445

4546
void setModel(AddressTableModel *model);

src/qt/bitcoin.cpp

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "intro.h"
1616
#include "networkstyle.h"
1717
#include "optionsmodel.h"
18+
#include "platformstyle.h"
1819
#include "splashscreen.h"
1920
#include "utilitydialog.h"
2021
#include "winshutdownmonitor.h"
@@ -241,6 +242,7 @@ public Q_SLOTS:
241242
WalletModel *walletModel;
242243
#endif
243244
int returnValue;
245+
const PlatformStyle *platformStyle;
244246

245247
void startThread();
246248
};
@@ -310,6 +312,22 @@ BitcoinApplication::BitcoinApplication(int &argc, char **argv):
310312
returnValue(0)
311313
{
312314
setQuitOnLastWindowClosed(false);
315+
316+
// UI per-platform customization
317+
// This must be done inside the BitcoinApplication constructor, or after it, because
318+
// PlatformStyle::instantiate requires a QApplication
319+
#if defined(Q_OS_MAC)
320+
std::string platformName = "macosx";
321+
#elif defined(Q_OS_WIN)
322+
std::string platformName = "windows";
323+
#else
324+
std::string platformName = "other";
325+
#endif
326+
platformName = GetArg("-uiplatform", platformName);
327+
platformStyle = PlatformStyle::instantiate(QString::fromStdString(platformName));
328+
if (!platformStyle) // Fall back to "other" if specified name not found
329+
platformStyle = PlatformStyle::instantiate("other");
330+
assert(platformStyle);
313331
}
314332

315333
BitcoinApplication::~BitcoinApplication()
@@ -330,6 +348,8 @@ BitcoinApplication::~BitcoinApplication()
330348
#endif
331349
delete optionsModel;
332350
optionsModel = 0;
351+
delete platformStyle;
352+
platformStyle = 0;
333353
}
334354

335355
#ifdef ENABLE_WALLET
@@ -346,7 +366,7 @@ void BitcoinApplication::createOptionsModel()
346366

347367
void BitcoinApplication::createWindow(const NetworkStyle *networkStyle)
348368
{
349-
window = new BitcoinGUI(networkStyle, 0);
369+
window = new BitcoinGUI(platformStyle, networkStyle, 0);
350370

351371
pollShutdownTimer = new QTimer(window);
352372
connect(pollShutdownTimer, SIGNAL(timeout()), window, SLOT(detectShutdown()));
@@ -421,6 +441,8 @@ void BitcoinApplication::initializeResult(int retval)
421441
returnValue = retval ? 0 : 1;
422442
if(retval)
423443
{
444+
// Log this only after AppInit2 finishes, as then logging setup is guaranteed complete
445+
qWarning() << "Platform customization:" << platformStyle->getName();
424446
#ifdef ENABLE_WALLET
425447
PaymentServer::LoadRootCAs();
426448
paymentServer->setOptionsModel(optionsModel);
@@ -432,7 +454,7 @@ void BitcoinApplication::initializeResult(int retval)
432454
#ifdef ENABLE_WALLET
433455
if(pwalletMain)
434456
{
435-
walletModel = new WalletModel(pwalletMain, optionsModel);
457+
walletModel = new WalletModel(platformStyle, pwalletMain, optionsModel);
436458

437459
window->addWallet(BitcoinGUI::DEFAULT_WALLET, walletModel);
438460
window->setCurrentWallet(BitcoinGUI::DEFAULT_WALLET);

src/qt/bitcoingui.cpp

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include "openuridialog.h"
1414
#include "optionsdialog.h"
1515
#include "optionsmodel.h"
16+
#include "platformstyle.h"
1617
#include "rpcconsole.h"
17-
#include "scicon.h"
1818
#include "utilitydialog.h"
1919

2020
#ifdef ENABLE_WALLET
@@ -60,7 +60,7 @@
6060

6161
const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
6262

63-
BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
63+
BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent) :
6464
QMainWindow(parent),
6565
clientModel(0),
6666
walletFrame(0),
@@ -98,7 +98,8 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
9898
notificator(0),
9999
rpcConsole(0),
100100
prevBlocks(0),
101-
spinnerFrame(0)
101+
spinnerFrame(0),
102+
platformStyle(platformStyle)
102103
{
103104
GUIUtil::restoreWindowGeometry("nWindow", QSize(850, 550), this);
104105

@@ -130,12 +131,12 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
130131
setUnifiedTitleAndToolBarOnMac(true);
131132
#endif
132133

133-
rpcConsole = new RPCConsole(0);
134+
rpcConsole = new RPCConsole(platformStyle, 0);
134135
#ifdef ENABLE_WALLET
135136
if(enableWallet)
136137
{
137138
/** Create wallet frame and make it the central widget */
138-
walletFrame = new WalletFrame(this);
139+
walletFrame = new WalletFrame(platformStyle, this);
139140
setCentralWidget(walletFrame);
140141
} else
141142
#endif // ENABLE_WALLET
@@ -175,7 +176,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
175176
QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
176177
frameBlocksLayout->setContentsMargins(3,0,3,0);
177178
frameBlocksLayout->setSpacing(3);
178-
unitDisplayControl = new UnitDisplayStatusBarControl();
179+
unitDisplayControl = new UnitDisplayStatusBarControl(platformStyle);
179180
labelEncryptionIcon = new QLabel();
180181
labelConnectionsIcon = new QLabel();
181182
labelBlocksIcon = new QLabel();
@@ -247,36 +248,36 @@ void BitcoinGUI::createActions()
247248
{
248249
QActionGroup *tabGroup = new QActionGroup(this);
249250

250-
overviewAction = new QAction(SingleColorIcon(":/icons/overview"), tr("&Overview"), this);
251+
overviewAction = new QAction(platformStyle->SingleColorIcon(":/icons/overview"), tr("&Overview"), this);
251252
overviewAction->setStatusTip(tr("Show general overview of wallet"));
252253
overviewAction->setToolTip(overviewAction->statusTip());
253254
overviewAction->setCheckable(true);
254255
overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1));
255256
tabGroup->addAction(overviewAction);
256257

257-
sendCoinsAction = new QAction(SingleColorIcon(":/icons/send"), tr("&Send"), this);
258+
sendCoinsAction = new QAction(platformStyle->SingleColorIcon(":/icons/send"), tr("&Send"), this);
258259
sendCoinsAction->setStatusTip(tr("Send coins to a Bitcoin address"));
259260
sendCoinsAction->setToolTip(sendCoinsAction->statusTip());
260261
sendCoinsAction->setCheckable(true);
261262
sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2));
262263
tabGroup->addAction(sendCoinsAction);
263264

264-
sendCoinsMenuAction = new QAction(TextColorIcon(":/icons/send"), sendCoinsAction->text(), this);
265+
sendCoinsMenuAction = new QAction(platformStyle->TextColorIcon(":/icons/send"), sendCoinsAction->text(), this);
265266
sendCoinsMenuAction->setStatusTip(sendCoinsAction->statusTip());
266267
sendCoinsMenuAction->setToolTip(sendCoinsMenuAction->statusTip());
267268

268-
receiveCoinsAction = new QAction(SingleColorIcon(":/icons/receiving_addresses"), tr("&Receive"), this);
269+
receiveCoinsAction = new QAction(platformStyle->SingleColorIcon(":/icons/receiving_addresses"), tr("&Receive"), this);
269270
receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and bitcoin: URIs)"));
270271
receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip());
271272
receiveCoinsAction->setCheckable(true);
272273
receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3));
273274
tabGroup->addAction(receiveCoinsAction);
274275

275-
receiveCoinsMenuAction = new QAction(TextColorIcon(":/icons/receiving_addresses"), receiveCoinsAction->text(), this);
276+
receiveCoinsMenuAction = new QAction(platformStyle->TextColorIcon(":/icons/receiving_addresses"), receiveCoinsAction->text(), this);
276277
receiveCoinsMenuAction->setStatusTip(receiveCoinsAction->statusTip());
277278
receiveCoinsMenuAction->setToolTip(receiveCoinsMenuAction->statusTip());
278279

279-
historyAction = new QAction(SingleColorIcon(":/icons/history"), tr("&Transactions"), this);
280+
historyAction = new QAction(platformStyle->SingleColorIcon(":/icons/history"), tr("&Transactions"), this);
280281
historyAction->setStatusTip(tr("Browse transaction history"));
281282
historyAction->setToolTip(historyAction->statusTip());
282283
historyAction->setCheckable(true);
@@ -300,46 +301,46 @@ void BitcoinGUI::createActions()
300301
connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
301302
#endif // ENABLE_WALLET
302303

303-
quitAction = new QAction(TextColorIcon(":/icons/quit"), tr("E&xit"), this);
304+
quitAction = new QAction(platformStyle->TextColorIcon(":/icons/quit"), tr("E&xit"), this);
304305
quitAction->setStatusTip(tr("Quit application"));
305306
quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
306307
quitAction->setMenuRole(QAction::QuitRole);
307-
aboutAction = new QAction(TextColorIcon(":/icons/about"), tr("&About Bitcoin Core"), this);
308+
aboutAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), tr("&About Bitcoin Core"), this);
308309
aboutAction->setStatusTip(tr("Show information about Bitcoin Core"));
309310
aboutAction->setMenuRole(QAction::AboutRole);
310-
aboutQtAction = new QAction(TextColorIcon(":/icons/about_qt"), tr("About &Qt"), this);
311+
aboutQtAction = new QAction(platformStyle->TextColorIcon(":/icons/about_qt"), tr("About &Qt"), this);
311312
aboutQtAction->setStatusTip(tr("Show information about Qt"));
312313
aboutQtAction->setMenuRole(QAction::AboutQtRole);
313-
optionsAction = new QAction(TextColorIcon(":/icons/options"), tr("&Options..."), this);
314+
optionsAction = new QAction(platformStyle->TextColorIcon(":/icons/options"), tr("&Options..."), this);
314315
optionsAction->setStatusTip(tr("Modify configuration options for Bitcoin Core"));
315316
optionsAction->setMenuRole(QAction::PreferencesRole);
316-
toggleHideAction = new QAction(TextColorIcon(":/icons/about"), tr("&Show / Hide"), this);
317+
toggleHideAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), tr("&Show / Hide"), this);
317318
toggleHideAction->setStatusTip(tr("Show or hide the main Window"));
318319

319-
encryptWalletAction = new QAction(TextColorIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this);
320+
encryptWalletAction = new QAction(platformStyle->TextColorIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this);
320321
encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet"));
321322
encryptWalletAction->setCheckable(true);
322-
backupWalletAction = new QAction(TextColorIcon(":/icons/filesave"), tr("&Backup Wallet..."), this);
323+
backupWalletAction = new QAction(platformStyle->TextColorIcon(":/icons/filesave"), tr("&Backup Wallet..."), this);
323324
backupWalletAction->setStatusTip(tr("Backup wallet to another location"));
324-
changePassphraseAction = new QAction(TextColorIcon(":/icons/key"), tr("&Change Passphrase..."), this);
325+
changePassphraseAction = new QAction(platformStyle->TextColorIcon(":/icons/key"), tr("&Change Passphrase..."), this);
325326
changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption"));
326-
signMessageAction = new QAction(TextColorIcon(":/icons/edit"), tr("Sign &message..."), this);
327+
signMessageAction = new QAction(platformStyle->TextColorIcon(":/icons/edit"), tr("Sign &message..."), this);
327328
signMessageAction->setStatusTip(tr("Sign messages with your Bitcoin addresses to prove you own them"));
328-
verifyMessageAction = new QAction(TextColorIcon(":/icons/verify"), tr("&Verify message..."), this);
329+
verifyMessageAction = new QAction(platformStyle->TextColorIcon(":/icons/verify"), tr("&Verify message..."), this);
329330
verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Bitcoin addresses"));
330331

331-
openRPCConsoleAction = new QAction(TextColorIcon(":/icons/debugwindow"), tr("&Debug window"), this);
332+
openRPCConsoleAction = new QAction(platformStyle->TextColorIcon(":/icons/debugwindow"), tr("&Debug window"), this);
332333
openRPCConsoleAction->setStatusTip(tr("Open debugging and diagnostic console"));
333334

334-
usedSendingAddressesAction = new QAction(TextColorIcon(":/icons/address-book"), tr("&Sending addresses..."), this);
335+
usedSendingAddressesAction = new QAction(platformStyle->TextColorIcon(":/icons/address-book"), tr("&Sending addresses..."), this);
335336
usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels"));
336-
usedReceivingAddressesAction = new QAction(TextColorIcon(":/icons/address-book"), tr("&Receiving addresses..."), this);
337+
usedReceivingAddressesAction = new QAction(platformStyle->TextColorIcon(":/icons/address-book"), tr("&Receiving addresses..."), this);
337338
usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels"));
338339

339-
openAction = new QAction(TextColorIcon(":/icons/open"), tr("Open &URI..."), this);
340+
openAction = new QAction(platformStyle->TextColorIcon(":/icons/open"), tr("Open &URI..."), this);
340341
openAction->setStatusTip(tr("Open a bitcoin: URI or payment request"));
341342

342-
showHelpMessageAction = new QAction(TextColorIcon(":/icons/info"), tr("&Command-line options"), this);
343+
showHelpMessageAction = new QAction(platformStyle->TextColorIcon(":/icons/info"), tr("&Command-line options"), this);
343344
showHelpMessageAction->setMenuRole(QAction::NoRole);
344345
showHelpMessageAction->setStatusTip(tr("Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options"));
345346

@@ -650,7 +651,7 @@ void BitcoinGUI::setNumConnections(int count)
650651
case 7: case 8: case 9: icon = ":/icons/connect_3"; break;
651652
default: icon = ":/icons/connect_4"; break;
652653
}
653-
labelConnectionsIcon->setPixmap(SingleColorIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
654+
labelConnectionsIcon->setPixmap(platformStyle->SingleColorIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
654655
labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Bitcoin network", "", count));
655656
}
656657

@@ -691,7 +692,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate)
691692
if(secs < 90*60)
692693
{
693694
tooltip = tr("Up to date") + QString(".<br>") + tooltip;
694-
labelBlocksIcon->setPixmap(SingleColorIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
695+
labelBlocksIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
695696

696697
#ifdef ENABLE_WALLET
697698
if(walletFrame)
@@ -737,7 +738,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate)
737738
tooltip = tr("Catching up...") + QString("<br>") + tooltip;
738739
if(count != prevBlocks)
739740
{
740-
labelBlocksIcon->setPixmap(SingleColorIcon(QString(
741+
labelBlocksIcon->setPixmap(platformStyle->SingleColorIcon(QString(
741742
":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')))
742743
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
743744
spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES;
@@ -931,15 +932,15 @@ void BitcoinGUI::setEncryptionStatus(int status)
931932
break;
932933
case WalletModel::Unlocked:
933934
labelEncryptionIcon->show();
934-
labelEncryptionIcon->setPixmap(SingleColorIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
935+
labelEncryptionIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
935936
labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b>"));
936937
encryptWalletAction->setChecked(true);
937938
changePassphraseAction->setEnabled(true);
938939
encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
939940
break;
940941
case WalletModel::Locked:
941942
labelEncryptionIcon->show();
942-
labelEncryptionIcon->setPixmap(SingleColorIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
943+
labelEncryptionIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
943944
labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>"));
944945
encryptWalletAction->setChecked(true);
945946
changePassphraseAction->setEnabled(true);
@@ -1041,7 +1042,7 @@ void BitcoinGUI::unsubscribeFromCoreSignals()
10411042
uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
10421043
}
10431044

1044-
UnitDisplayStatusBarControl::UnitDisplayStatusBarControl() :
1045+
UnitDisplayStatusBarControl::UnitDisplayStatusBarControl(const PlatformStyle *platformStyle) :
10451046
optionsModel(0),
10461047
menu(0)
10471048
{
@@ -1056,7 +1057,7 @@ UnitDisplayStatusBarControl::UnitDisplayStatusBarControl() :
10561057
}
10571058
setMinimumSize(max_width, 0);
10581059
setAlignment(Qt::AlignRight | Qt::AlignVCenter);
1059-
setStyleSheet(QString("QLabel { color : %1 }").arg(SingleColor().name()));
1060+
setStyleSheet(QString("QLabel { color : %1 }").arg(platformStyle->SingleColor().name()));
10601061
}
10611062

10621063
/** So that it responds to button clicks */

0 commit comments

Comments
 (0)