mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 21:52:38 +01:00
Replace save|restoreWindowGeometry with Qt functions
This commit is contained in:
@@ -123,7 +123,11 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
|
||||
spinnerFrame(0),
|
||||
platformStyle(_platformStyle)
|
||||
{
|
||||
GUIUtil::restoreWindowGeometry("nWindow", QSize(850, 550), this);
|
||||
QSettings settings;
|
||||
if (!restoreGeometry(settings.value("MainWindowGeometry").toByteArray())) {
|
||||
// Restore failed (perhaps missing setting), center the window
|
||||
move(QApplication::desktop()->availableGeometry().center() - frameGeometry().center());
|
||||
}
|
||||
|
||||
QString windowTitle = tr(PACKAGE_NAME) + " - ";
|
||||
#ifdef ENABLE_WALLET
|
||||
@@ -261,7 +265,8 @@ BitcoinGUI::~BitcoinGUI()
|
||||
// Unsubscribe from notifications from core
|
||||
unsubscribeFromCoreSignals();
|
||||
|
||||
GUIUtil::saveWindowGeometry("nWindow", this);
|
||||
QSettings settings;
|
||||
settings.setValue("MainWindowGeometry", saveGeometry());
|
||||
if(trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu)
|
||||
trayIcon->hide();
|
||||
#ifdef Q_OS_MAC
|
||||
|
||||
Reference in New Issue
Block a user