frontend: Add new component SlidingStackedWidget #12678
Open
+302
−0
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.
Description
Adds a new widget called SlidingStackedWidget that performs a sliding animation when switching between pages.
This is heavily based on the work in https://github.com/timschneeb/SlidingStackedWidget with a couple functionality tweaks, and adjustments to match our naming conventions. The biggest changes compared to the original widget in the repo above is to allow SlidingStackedWidget to be a completely transparent drop-in replacement for QStackedWidget. This is accomplished by overriding the normal QStackedWidget methods for changing pages, and adding handling for changing pages during the animation.
Note
This preview is for demonstration purposes only.
This PR does NOT update the settings window to use this sliding widget and there are no intentions to do so.
obs64_yDHmTWiq5v.mp4
Motivation and Context
Planning to use this in future UI updates around onboarding and certain configuration windows.
How Has This Been Tested?
Changed the settings window QStackedWidget to use this instead and ensured it behaved as expected.
Types of changes
Checklist: