Sometimes sidebar visibility state is incorrect #524
Closed
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.
Hi @githubuser0xFFFF, hope you are doing well 😄. I have a very interesting bug fix. Currently I can see that
AutoHideSideBarPrivate::handleViewportEvent
andcase QEvent::Resize
is responsible for hiding the sidebar widgets if any of the sidebar widgets are hidden (e.g. during view toggle - disable). Since this depends on theSize < TabSize
, this can sometimes be incorrect during certain scenarios.There are two scenarios this bug comes about. The first scenario is more easily reproducible, while the second one unfortunately I can only reproduce in our application - not in any of the demo applications.
Here's how to reproduce the first scenario:
The second scenario occurs only during application startup. During that time, before first shown, it seems the sizes of the tabs and of the sidebar are incorrect (likely because layout calculations have not run yet), causing it to be hidden even when there are side tab widgets.
The fix is simple, instead of using resize to hide widgets, I simply hook on to the auto hide tab widget itself being hidden and hide the side bar if there are no more visible auto hide tabs. Let me know if this covers all the cases, thanks!