Skip to content

Commit e82000e

Browse files
committed
fix(FluPivot): 修复 title 下划线动画未能完全关闭的问题
修复了在 `FluTheme.animationEnabled = false` 时,从文字较少的 title 切换到文字较多的 title 时,下划线仍然存在尺寸变化动画的问题。
1 parent 1a8e3d5 commit e82000e

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

src/Qt5/imports/FluentUI/Controls/FluPivot.qml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,15 @@ Page {
3131
interactive: false
3232
orientation: ListView.Horizontal
3333
highlightMoveDuration: FluTheme.animationEnabled ? 167 : 0
34+
highlightResizeDuration: FluTheme.animationEnabled ? 167 : 0
3435
highlight: Item{
3536
clip: true
3637
Rectangle{
3738
height: 3
3839
radius: 1.5
3940
color: FluTheme.primaryColor
40-
width: nav_list.currentItem ? nav_list.currentItem.width : 0
41+
width: nav_list.currentItem.width
4142
y:d.tabY
42-
Behavior on width {
43-
enabled: FluTheme.animationEnabled
44-
NumberAnimation{
45-
duration: 167
46-
easing.type: Easing.OutCubic
47-
}
48-
}
4943
}
5044
}
5145
delegate: Button{

src/Qt6/imports/FluentUI/Controls/FluPivot.qml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,15 @@ Page {
3232
interactive: false
3333
orientation: ListView.Horizontal
3434
highlightMoveDuration: FluTheme.animationEnabled ? 167 : 0
35+
highlightResizeDuration: FluTheme.animationEnabled ? 167 : 0
3536
highlight: Item{
3637
clip: true
3738
Rectangle{
3839
height: 3
3940
radius: 1.5
4041
color: FluTheme.primaryColor
41-
width: nav_list.currentItem ? nav_list.currentItem.width : 0
42+
width: nav_list.currentItem.width
4243
y:d.tabY
43-
Behavior on width {
44-
enabled: FluTheme.animationEnabled
45-
NumberAnimation{
46-
duration: 167
47-
easing.type: Easing.OutCubic
48-
}
49-
}
5044
}
5145
}
5246
delegate: Button{

0 commit comments

Comments
 (0)