Merge pull request #3297
84f8551
[Qt] misc small Mac related changes/cleanups (Philip Kaufmann)
This commit is contained in:
commit
6694f4a7a2
3 changed files with 31 additions and 9 deletions
|
@ -4,18 +4,25 @@
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>bitcoin.icns</string>
|
<string>bitcoin.icns</string>
|
||||||
|
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
|
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@, Copyright © 2009-@COPYRIGHT_YEAR@ The Bitcoin developers</string>
|
<string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@, Copyright © 2009-@COPYRIGHT_YEAR@ The Bitcoin developers</string>
|
||||||
|
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@</string>
|
<string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@</string>
|
||||||
|
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@</string>
|
<string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@</string>
|
||||||
|
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
|
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>Bitcoin-Qt</string>
|
<string>Bitcoin-Qt</string>
|
||||||
|
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.bitcoinfoundation.Bitcoin-Qt</string>
|
<string>org.bitcoinfoundation.Bitcoin-Qt</string>
|
||||||
|
|
||||||
|
@ -69,7 +76,11 @@
|
||||||
<string>Owner</string>
|
<string>Owner</string>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
|
||||||
<key>NSHighResolutionCapable</key>
|
<key>NSHighResolutionCapable</key>
|
||||||
<true/>
|
<string>True</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -200,6 +200,13 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
Q_INIT_RESOURCE(bitcoin);
|
Q_INIT_RESOURCE(bitcoin);
|
||||||
QApplication app(argc, argv);
|
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
|
// Register meta types used for QMetaObject::invokeMethod
|
||||||
qRegisterMetaType< bool* >();
|
qRegisterMetaType< bool* >();
|
||||||
|
|
|
@ -69,28 +69,32 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
|
||||||
{
|
{
|
||||||
GUIUtil::restoreWindowGeometry("nWindow", QSize(850, 550), this);
|
GUIUtil::restoreWindowGeometry("nWindow", QSize(850, 550), this);
|
||||||
|
|
||||||
#ifndef Q_OS_MAC
|
|
||||||
if (!fIsTestnet)
|
if (!fIsTestnet)
|
||||||
{
|
{
|
||||||
setWindowTitle(tr("Bitcoin") + " - " + tr("Wallet"));
|
setWindowTitle(tr("Bitcoin") + " - " + tr("Wallet"));
|
||||||
|
#ifndef Q_OS_MAC
|
||||||
QApplication::setWindowIcon(QIcon(":icons/bitcoin"));
|
QApplication::setWindowIcon(QIcon(":icons/bitcoin"));
|
||||||
setWindowIcon(QIcon(":icons/bitcoin"));
|
setWindowIcon(QIcon(":icons/bitcoin"));
|
||||||
|
#else
|
||||||
|
MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin"));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setWindowTitle(tr("Bitcoin") + " - " + tr("Wallet") + " " + tr("[testnet]"));
|
setWindowTitle(tr("Bitcoin") + " - " + tr("Wallet") + " " + tr("[testnet]"));
|
||||||
|
#ifndef Q_OS_MAC
|
||||||
QApplication::setWindowIcon(QIcon(":icons/bitcoin_testnet"));
|
QApplication::setWindowIcon(QIcon(":icons/bitcoin_testnet"));
|
||||||
setWindowIcon(QIcon(":icons/bitcoin_testnet"));
|
setWindowIcon(QIcon(":icons/bitcoin_testnet"));
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
setUnifiedTitleAndToolBarOnMac(true);
|
|
||||||
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
|
|
||||||
|
|
||||||
if (!fIsTestnet)
|
|
||||||
MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin"));
|
|
||||||
else
|
|
||||||
MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin_testnet"));
|
MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin_testnet"));
|
||||||
#endif
|
#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
|
// Create wallet frame and make it the central widget
|
||||||
walletFrame = new WalletFrame(this);
|
walletFrame = new WalletFrame(this);
|
||||||
|
|
Loading…
Reference in a new issue