Fix subwindows occasionally snapping to minimum size 2: Electric Boogaloo#8396
Open
sqrvrt wants to merge 4 commits into
Open
Conversation
Removes layout constraints when child is hidden, reapplies when child is shown.
Contributor
Author
|
build fails are not mine |
I didn't fully soft-revert the last fix so this happened. The issue was that `|| visible` would steal the thing and QMdiSubWindow handler wouldn't execute which is important for doing pretty much everything about the window frame.
…hell-is-happening-to-subwindows-for-real-this-time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unlike the previous PR (which this pretty much reverts aside from documentation), this completely removes the layout size constraints on SubWindow when child widget is hidden, essentially allowing it to resize freely, and reapplies them once it's shown.
Possible remaining edge cases:
setGeometryon child frame plus margin, don't know if there's a better way. Need a test case to do something about it, it's possible that nothing does that as of right now. this was also a thing without this PR, probably better off as a separate issue tbh if it ever becomes relevantSetMinAndMaxSize, so if the widget was added while hidden it is possible for the bug to still occur. To do better we need to track childEvent, which is not particularly fun, or rewrite the damn thing without hijacking QMdiSubWindow (i promise i will get to it at some point ( ._.)i also removed WindowStateChange event suppression because it seems to only cause issues and i never knew what it's even supposed to do.