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-2791: Prevent panes of options window being fully collapsible #2345

Merged
merged 2 commits into from
Dec 16, 2023

Conversation

phw
Copy link
Member

@phw phw commented Dec 13, 2023

Summary

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

Problem

Prevents users accidentally hiding a pane without knowing how to get it back.

Solution

Set setChildrenCollapsible on the splitter and minimum widths for the panes. Very similar to what was done in #1634 for the main window panes.

Prevents users accidentally hiding a pane without knowing how to get it back.
@phw phw requested a review from zas December 13, 2023 21:07
@phw
Copy link
Member Author

phw commented Dec 13, 2023

@zas: I'll adjust this patch for the 2.10.x branch after it got merged.

Also can you test this in the options? For me with Qt6 resizing the panes is extremely laggy. Works well in Qt5. No such issue in the main view.

@zas
Copy link
Collaborator

zas commented Dec 14, 2023

Also can you test this in the options? For me with Qt6 resizing the panes is extremely laggy. Works well in Qt5. No such issue in the main view.

I tested and it's a bit laggy to me too, but I noticed a possible reason:

  • without the patch, resizing hide existing widgets pixel per pixel

Moving the central bar to the right leads to:
image

  • with it, resizing hide the widget in whole at once

If you move the central bar to the right as above, texts & buttons suddenly disappear:

image
image

@phw
Copy link
Member Author

phw commented Dec 14, 2023

If you move the central bar to the right as above, texts & buttons suddenly disappear:

That is actually what is supposed to be prevented by setChildrenCollapsible(False). Can you test with a fresh config? We probably need to reset the persisted splitter state as we did in #1634

If setChildrenCollapsible(True) then the behavior you describe is expected if there are min sizes for the panes. You can resize freely in the size boundaries or hide completely.

In any way, this seems to be all unrelated to the sluggish behavior, as this is the same either way (and not present in Qt5). I rather suspect that some drawing or layout calculation performance is worse, and resizing this particular view has to recalculate the layout of all the different option pages. This seems to be the case, as you for example cannot resize beyond a certain size if it is prevented by the layout of any specific page.

@zas
Copy link
Collaborator

zas commented Dec 14, 2023

Can you test with a fresh config? We probably need to reset the persisted splitter state as we did in #1634

Yes, that's it, I removed splitters_OptionsDialog and it works as expected.
You are right, that's unrelated to sluggish behavior (here that's quick enough). Can it be related to your Qt acceleration settings (OpenGL or whatever)?

@phw phw force-pushed the PICARD-2791-options-panes-minsize branch from d0dc0c4 to 9c1f00f Compare December 15, 2023 16:34
@phw
Copy link
Member Author

phw commented Dec 15, 2023

@zas I added a config upgrade hook to clear splitters_OptionsDialog

Copy link
Collaborator

@zas zas left a comment

Choose a reason for hiding this comment

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

LGTM

@phw phw merged commit 41a8381 into metabrainz:master Dec 16, 2023
60 of 61 checks passed
@phw phw deleted the PICARD-2791-options-panes-minsize branch December 16, 2023 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants