-
-
Notifications
You must be signed in to change notification settings - Fork 705
feat(navigation): add WinUI indicator transition animation #1086
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
Closed
Conversation
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
Owner
|
WinUI 的 indicator 收缩动画应该是在两个按钮之间进行收缩,目前实现的是单个按钮内的收缩,看起来有点奇怪, |
Contributor
Author
重写了一下 2025-11-2221-58-22-ezgif.com-gif-maker.mp4 |
zhiyiYo
requested changes
Nov 23, 2025
Contributor
Author
|
demo 里加了使用示例 |
Owner
Contributor
Author
Owner
|
我用的commit id 是205dc77,应该是最新的 2025-11-29.14.20.12.mp4 |
Contributor
Author
啊这,我写个新方法遍历下树结构看看( 2025-11-2914-29-52.mp4 |
Owner
|
感觉写的有点乱,所以我在 PyQt5 分支重构了这部分代码,这个 PR 先关掉了 |
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.



Navigation Indicator Animation - WinUI 导航指示器过渡动画(重制版)
参照 WinUI3 NavigationView,为 PyQt-Fluent-Widgets 的导航组件添加平滑的指示器过渡动画。
view.mp4
演示
主要改动
新增文件
NavigationIndicatorAnimator类:管理指示器动画状态和逻辑_lastSelectMarkTop/Bottom、_selectMarkTop/Bottom_isMovingDown()使用全局坐标判断移动方向drawIndicator()支持树状菜单的左边距调整两阶段动画:
第一阶段(收缩):
_lastSelectMarkTop: 10 → 0)_lastSelectMarkBottom: 10 → 0)第二阶段(展开):
_selectMarkBottom: 0 → 10)_selectMarkTop: 0 → 10)动画参数
QEasingCurve.InOutSinemapToGlobal()获取全局坐标API
完整的演示代码位于
examples/navigation/navigation_indicator_animation/demo.py参考