Fix main window geometry save/restore #107

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:201023-geometry changing 1 files +9 −5
  1. hebasto commented at 1:08 PM on October 23, 2020: member

    Fix #104 ?

  2. qt: Fix main window geometry save/restore 82f81f713a
  3. hebasto renamed this:
    qt: Fix main window geometry save/restore
    Fix main window geometry save/restore
    on Oct 23, 2020
  4. in src/qt/bitcoingui.cpp:86 in 82f81f713a
      81 | @@ -82,10 +82,10 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
      82 |      m_network_style(networkStyle)
      83 |  {
      84 |      QSettings settings;
      85 | -    if (!restoreGeometry(settings.value("MainWindowGeometry").toByteArray())) {
      86 | -        // Restore failed (perhaps missing setting), center the window
      87 | -        move(QGuiApplication::primaryScreen()->availableGeometry().center() - frameGeometry().center());
      88 | -    }
      89 | +    settings.beginGroup("MainWindow");
      90 | +    resize(settings.value("size", QSize(800, 540)).toSize());
    


    luke-jr commented at 2:39 PM on October 24, 2020:

    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)


    hebasto commented at 8:15 PM on October 24, 2020:

    This is a default size that is used only at first run or after -resetguisettings.


    luke-jr commented at 9:44 PM on October 24, 2020:

    I'm aware. But the ideal default size isn't measured in pixels.


    hebasto commented at 10:20 PM on October 24, 2020:

    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 :)


    luke-jr commented at 11:14 PM on October 24, 2020:

    Until we removed the default wallet, the default window size was automatically sane for any platform. We just need to go back to that.


    hebasto commented at 9:25 AM on October 25, 2020:

    @luke-jr Do you suggest to revert https://github.com/bitcoin/bitcoin/pull/15454 back or to calculate the default window size as if a wallet is loaded?


    luke-jr commented at 1:53 PM on October 25, 2020:

    The latter of course


    hebasto commented at 7:52 PM on October 25, 2020:

    Reworked in #116.

  5. luke-jr changes_requested
  6. jonasschnelli referenced this in commit 55b1ffcd25 on Oct 27, 2020
  7. sidhujag referenced this in commit 63d4f53dde on Oct 27, 2020
  8. hebasto closed this on Nov 11, 2020

  9. bitcoin-core locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 00:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me