Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save QSplitter state in QSettings #165

Merged
merged 1 commit into from
Jan 7, 2021
Merged

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Dec 25, 2020

This PR adds the ability to save the QSplitter widget state in QSettings during shutdown, and restore it on startup.

A user no longer needs to adjust the splitter every time :)
DeepinScreenshot_select-area_20201225211422

@jonatack
Copy link
Member

Great idea. Was complaining about this to myself just again today.

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 90f9fc2 this sets the "PeersTabSplitterSizes" value in the RPCConsole dtor and restores it in the RPCConsole ctor; tested in Debian with various split settings, tab open/close sequences, and shutdown methods, and the Peers window split state was faithfully maintained.

@jonasschnelli
Copy link
Contributor

Good idea and just two lines of code.
utACK 90f9fc2

Copy link
Member

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ACK on macOS Big Sur 11.1 with Qt 5.15.2. Works great and is a useful feature!

Copy link
Member

@luke-jr luke-jr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@maflcko maflcko merged commit 8a720ce into bitcoin-core:master Jan 7, 2021
@hebasto hebasto deleted the 201225-geo branch January 7, 2021 11:16
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jan 7, 2021
90f9fc2 qt: Save QSplitter state in QSettings (Hennadii Stepanov)

Pull request description:

  This PR adds the ability to save the `QSplitter` widget state in `QSettings` during shutdown, and restore it on startup.

  A user no longer needs to adjust the splitter every time :)
  ![DeepinScreenshot_select-area_20201225211422](https://user-images.githubusercontent.com/32963518/103141024-046c3980-46f7-11eb-9a8c-83613527ffe1.png)

ACKs for top commit:
  jonasschnelli:
    utACK 90f9fc2
  jonatack:
    ACK 90f9fc2 this sets the "PeersTabSplitterSizes" value in the RPCConsole dtor and restores it in the RPCConsole ctor; tested in Debian with various split settings, tab open/close sequences, and shutdown methods, and the Peers window split state was faithfully maintained.

Tree-SHA512: efbd6a4cee512982944955d36775e75a8a217b1dc49e62d42c6e402d2710dd44324b2c3c1edeb5fe38d9229e0e4a39734d1f4e63405ade8694762e1bbf72020b
@luke-jr
Copy link
Member

luke-jr commented Jan 19, 2021

Note that we might need to change the setting name for each version that adds/removes columns :/

@bitcoin-core bitcoin-core locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants