aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-12-09 15:35:10 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2013-12-09 15:36:14 +0100
commit6694f4a7a21a2c8250dfd30f17cc528c984ffe58 (patch)
tree73739932d060f37fa5d59e2bec932b27f4321b91 /src
parent7266bb1bdc35466a956e1596a5369d3e866503ce (diff)
parent84f8551f3ab2ee1be72590278855972e7f200c94 (diff)
Merge pull request #3297
84f8551 [Qt] misc small Mac related changes/cleanups (Philip Kaufmann)
Diffstat (limited to 'src')
-rw-r--r--src/qt/bitcoin.cpp7
-rw-r--r--src/qt/bitcoingui.cpp20
2 files changed, 19 insertions, 8 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 2f9e205c8d..2b3bf3bfb5 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -200,6 +200,13 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(bitcoin);
QApplication app(argc, argv);
+#if QT_VERSION > 0x050100
+ // Generate high-dpi pixmaps
+ QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+#endif
+#ifdef Q_OS_MAC
+ QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
+#endif
// Register meta types used for QMetaObject::invokeMethod
qRegisterMetaType< bool* >();
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index b3a566428d..b1daba5cba 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -69,28 +69,32 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
{
GUIUtil::restoreWindowGeometry("nWindow", QSize(850, 550), this);
-#ifndef Q_OS_MAC
if (!fIsTestnet)
{
setWindowTitle(tr("Bitcoin") + " - " + tr("Wallet"));
+#ifndef Q_OS_MAC
QApplication::setWindowIcon(QIcon(":icons/bitcoin"));
setWindowIcon(QIcon(":icons/bitcoin"));
+#else
+ MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin"));
+#endif
}
else
{
setWindowTitle(tr("Bitcoin") + " - " + tr("Wallet") + " " + tr("[testnet]"));
+#ifndef Q_OS_MAC
QApplication::setWindowIcon(QIcon(":icons/bitcoin_testnet"));
setWindowIcon(QIcon(":icons/bitcoin_testnet"));
- }
#else
- setUnifiedTitleAndToolBarOnMac(true);
- QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
-
- if (!fIsTestnet)
- MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin"));
- else
MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin_testnet"));
#endif
+ }
+
+#if defined(Q_OS_MAC) && QT_VERSION < 0x050000
+ // This property is not implemented in Qt 5. Setting it has no effect.
+ // A replacement API (QtMacUnifiedToolBar) is available in QtMacExtras.
+ setUnifiedTitleAndToolBarOnMac(true);
+#endif
// Create wallet frame and make it the central widget
walletFrame = new WalletFrame(this);