From e82000e6f8ecd96cc57fbf800144669f3acf6f18 Mon Sep 17 00:00:00 2001 From: luckyloogn Date: Wed, 1 Jan 2025 17:24:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(FluPivot):=20=E4=BF=AE=E5=A4=8D=20title=20?= =?UTF-8?q?=E4=B8=8B=E5=88=92=E7=BA=BF=E5=8A=A8=E7=94=BB=E6=9C=AA=E8=83=BD?= =?UTF-8?q?=E5=AE=8C=E5=85=A8=E5=85=B3=E9=97=AD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复了在 `FluTheme.animationEnabled = false` 时,从文字较少的 title 切换到文字较多的 title 时,下划线仍然存在尺寸变化动画的问题。 --- src/Qt5/imports/FluentUI/Controls/FluPivot.qml | 10 ++-------- src/Qt6/imports/FluentUI/Controls/FluPivot.qml | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/Qt5/imports/FluentUI/Controls/FluPivot.qml b/src/Qt5/imports/FluentUI/Controls/FluPivot.qml index ce45429a..21a302ee 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluPivot.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluPivot.qml @@ -31,21 +31,15 @@ Page { interactive: false orientation: ListView.Horizontal highlightMoveDuration: FluTheme.animationEnabled ? 167 : 0 + highlightResizeDuration: FluTheme.animationEnabled ? 167 : 0 highlight: Item{ clip: true Rectangle{ height: 3 radius: 1.5 color: FluTheme.primaryColor - width: nav_list.currentItem ? nav_list.currentItem.width : 0 + width: nav_list.currentItem.width y:d.tabY - Behavior on width { - enabled: FluTheme.animationEnabled - NumberAnimation{ - duration: 167 - easing.type: Easing.OutCubic - } - } } } delegate: Button{ diff --git a/src/Qt6/imports/FluentUI/Controls/FluPivot.qml b/src/Qt6/imports/FluentUI/Controls/FluPivot.qml index 7c0a9681..aa87558d 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluPivot.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluPivot.qml @@ -32,21 +32,15 @@ Page { interactive: false orientation: ListView.Horizontal highlightMoveDuration: FluTheme.animationEnabled ? 167 : 0 + highlightResizeDuration: FluTheme.animationEnabled ? 167 : 0 highlight: Item{ clip: true Rectangle{ height: 3 radius: 1.5 color: FluTheme.primaryColor - width: nav_list.currentItem ? nav_list.currentItem.width : 0 + width: nav_list.currentItem.width y:d.tabY - Behavior on width { - enabled: FluTheme.animationEnabled - NumberAnimation{ - duration: 167 - easing.type: Easing.OutCubic - } - } } } delegate: Button{