From ac0b0aaaa909d86ca13a4871482cd02ad0a7e4bb Mon Sep 17 00:00:00 2001 From: zhuzihcu Date: Wed, 17 May 2023 18:24:11 +0800 Subject: [PATCH] update --- example/qml/window/MainWindow.qml | 5 +++-- src/imports/FluentUI/Controls/FluNavigationView.qml | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/example/qml/window/MainWindow.qml b/example/qml/window/MainWindow.qml index b7e3615..d28ea4d 100644 --- a/example/qml/window/MainWindow.qml +++ b/example/qml/window/MainWindow.qml @@ -94,8 +94,7 @@ CustomWindow { FluNavigationView{ id:nav_view anchors{ - top: title_bar.bottom - topMargin: -20 + top: parent.top left: parent.left right: parent.right bottom: parent.bottom @@ -121,6 +120,8 @@ CustomWindow { ItemsOriginal.navigationView = nav_view ItemsFooter.navigationView = nav_view nav_view.setCurrentIndex(0) + setHitTestVisible(nav_view.backButton()) + setHitTestVisible(nav_view.navButton()) } } } diff --git a/src/imports/FluentUI/Controls/FluNavigationView.qml b/src/imports/FluentUI/Controls/FluNavigationView.qml index d43e869..6c74c32 100644 --- a/src/imports/FluentUI/Controls/FluNavigationView.qml +++ b/src/imports/FluentUI/Controls/FluNavigationView.qml @@ -461,6 +461,7 @@ Item { height:parent.height spacing: 0 FluIconButton{ + id:btn_back iconSource: FluentIcons.ChromeBack Layout.leftMargin: 5 Layout.preferredWidth: 30 @@ -922,4 +923,10 @@ Item { } } } + function backButton(){ + return btn_back + } + function navButton(){ + return btn_nav + } }