From 5d1106401119e922911b469caf19e5372f8ecd87 Mon Sep 17 00:00:00 2001 From: Pemvin Date: Thu, 9 Nov 2023 17:38:07 +0800 Subject: [PATCH] Update FluTour.qml Automatic place tour boxes above or below targets --- src/Qt5/imports/FluentUI/Controls/FluTour.qml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Qt5/imports/FluentUI/Controls/FluTour.qml b/src/Qt5/imports/FluentUI/Controls/FluTour.qml index d9febaac..09b54ec6 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluTour.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluTour.qml @@ -120,8 +120,18 @@ Popup{ width: 500 height: 88 + text_desc.height color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) + property int dir : { + if(yd.windowHeight) + return d.pos.y-height-control.targetMargins - 15 + return ty + } border.width: 0 FluShadow{ radius: 5 @@ -194,9 +204,9 @@ Popup{ } } FluIcon{ - iconSource: FluentIcons.FlickDown + iconSource: layout_panne.dir?FluentIcons.FlickUp:FluentIcons.FlickDown color: layout_panne.color x: d.pos.x+d.target.width/2-10 - y: d.pos.y+d.target.height + y: d.pos.y+(layout_panne.dir?-height:d.target.height) } }