From 1df3b4ba964d794ea8ee023b4d28f643c59e3e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Tue, 11 Apr 2023 23:39:20 +0800 Subject: [PATCH] update --- example/page/AboutPage.qml | 3 +-- src/controls/FluNavigationView.qml | 24 +++++++++++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/example/page/AboutPage.qml b/example/page/AboutPage.qml index 36eb76c5..7616c439 100644 --- a/example/page/AboutPage.qml +++ b/example/page/AboutPage.qml @@ -69,8 +69,7 @@ FluWindow { text:"https://github.com/zhuzichu520/FluentUI" Layout.alignment: Qt.AlignBottom onClicked: { - console.debug(window.width) -// Qt.openUrlExternally(text_hublink.text) + Qt.openUrlExternally(text_hublink.text) } } } diff --git a/src/controls/FluNavigationView.qml b/src/controls/FluNavigationView.qml index 15d6703d..7304e13f 100644 --- a/src/controls/FluNavigationView.qml +++ b/src/controls/FluNavigationView.qml @@ -467,11 +467,17 @@ Item { iconSize: 15 Layout.preferredWidth: 40 Layout.preferredHeight: 40 - visible: d.isMinimal + visible: opacity + opacity: d.isMinimal Layout.alignment: Qt.AlignVCenter onClicked: { d.enableNavigationPanel = !d.enableNavigationPanel } + Behavior on opacity{ + NumberAnimation{ + duration: 220 + } + } } Image{ id:image_logo @@ -582,16 +588,28 @@ Item { id:loader_auto_suggest_box anchors.centerIn: parent sourceComponent: autoSuggestBox - visible: { + opacity: { if(d.isCompactAndNotPanel){ return false } return true } + visible: opacity + Behavior on opacity{ + NumberAnimation{ + duration: 100 + } + } } FluIconButton{ - visible:d.isCompactAndNotPanel + visible:opacity + opacity:d.isCompactAndNotPanel + Behavior on opacity{ + NumberAnimation{ + duration: 220 + } + } hoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) pressedColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) normalColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)