Fix main window geometry save/restore#107
Fix main window geometry save/restore#107hebasto wants to merge 1 commit intobitcoin-core:masterfrom
Conversation
| move(QGuiApplication::primaryScreen()->availableGeometry().center() - frameGeometry().center()); | ||
| } | ||
| settings.beginGroup("MainWindow"); | ||
| resize(settings.value("size", QSize(800, 540)).toSize()); |
There was a problem hiding this comment.
Not sure hard-coding a size in pixels is a good idea. It should auto-size based on what Qt determines is needed when a wallet is loaded (ie, all widgets visible)
There was a problem hiding this comment.
This is a default size that is used only at first run or after -resetguisettings.
There was a problem hiding this comment.
I'm aware. But the ideal default size isn't measured in pixels.
There was a problem hiding this comment.
But the ideal default size isn't measured in pixels.
Correct. The ideal size is set by users and it will be saved in settings. I don't think the default size could be ideal for more than one person :)
There was a problem hiding this comment.
Until we removed the default wallet, the default window size was automatically sane for any platform. We just need to go back to that.
There was a problem hiding this comment.
@luke-jr Do you suggest to revert bitcoin/bitcoin#15454 back or to calculate the default window size as if a wallet is loaded?
…loaded wallets 7b2e42e qt: Add WalletFrame::sizeHint (Hennadii Stepanov) Pull request description: This PR fixes a bug in master (d67883d) and in 0.20.1 that could be easily reproduced with ``` $ src/qt/bitcoin-qt -regtest -resetguisettings -nowallet ```   **With this PR:**   --- Fix #104 Fix #113 This PR is an alternative to #107 without [hard-coding a size in pixels](#107 (comment)). ACKs for top commit: jonasschnelli: Tested ACK 7b2e42e - I can confirm this fixes #104 (Ubuntu 20.04 - HiDPI 200%). Tree-SHA512: eb0692dbeb3befdeecca0e41534c9783eab6637c14cc4f170ee42619235884f9354f8d22a10c20c08cc89dc5340a60b7dfa2523c12e64b3386b3fd2c6d5f934e
… window without loaded wallets 7b2e42e qt: Add WalletFrame::sizeHint (Hennadii Stepanov) Pull request description: This PR fixes a bug in master (d67883d) and in 0.20.1 that could be easily reproduced with ``` $ src/qt/bitcoin-qt -regtest -resetguisettings -nowallet ```   **With this PR:**   --- Fix #104 Fix #113 This PR is an alternative to #107 without [hard-coding a size in pixels](bitcoin-core/gui#107 (comment)). ACKs for top commit: jonasschnelli: Tested ACK 7b2e42e - I can confirm this fixes #104 (Ubuntu 20.04 - HiDPI 200%). Tree-SHA512: eb0692dbeb3befdeecca0e41534c9783eab6637c14cc4f170ee42619235884f9354f8d22a10c20c08cc89dc5340a60b7dfa2523c12e64b3386b3fd2c6d5f934e
Fix #104 ?