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

PICARD-1200: fix Options tree pane resizing #850

Merged
merged 1 commit into from Feb 27, 2018
Merged

Conversation

zas
Copy link
Collaborator

@zas zas commented Feb 27, 2018

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

Options tree pane resizing is impossible, the behaviour is unexpected.

Solution

Size policy of both panes plus the minimum width enforced for the tree pane are responsible of the issue

Set horizontal policies to Ignored, and use QSplitter.setSizes() to set a smart default.
After this change, it is possible to move the splitter smoothly.

Action

Review & test

Size policy of both panes plus the minimum width enforced for the tree pane are responsible of the issue

Set horizontal policies to Ignored, and use QSplitter.setSizes() to set a smart default.
After this change, it is possible to move the splitter smoothly.
@zas zas requested a review from samj1912 February 27, 2018 12:45
@samj1912
Copy link
Collaborator

samj1912 commented Feb 27, 2018

Hmm, while playing with this I noticed a pretty bad GUI bug, we can completely hide the left side options pane, which is very counter-intuitive imo. This is also present in master.

Apart from that the PR LGTM. Couldn't find any obvious bugs.

Another bug (Also present in master) is that if I expand a menu item and close options and open options again, it is again collapsed.

@zas
Copy link
Collaborator Author

zas commented Feb 27, 2018

Hmm, while playing with this I noticed a pretty bad GUI bug, we can completely hide the left side options pane, which is very counter-intuitive imo. This is also present in master.

Yes, we can prevent it by setting a minimum width, though it isn't a real issue, since the splitter handle is still available. Not worth to bother imho.

Another bug (Also present in master) is that if I expand a menu item and close options and open options again, it is again collapsed.

That's not a bug, the trick to get correct tree pane width is expanding then collapsing the tree, so it always starts collapsed.
There's a feature request to save the current option pane and restore it when the options dialog is open again, it could be part of such improvement.

@zas zas merged commit 2349388 into metabrainz:master Feb 27, 2018
@zas zas deleted the splitter branch February 27, 2018 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants