diff --git a/example/qml/page/T_Home.qml b/example/qml/page/T_Home.qml index 205b6b0d..759445de 100644 --- a/example/qml/page/T_Home.qml +++ b/example/qml/page/T_Home.qml @@ -22,7 +22,7 @@ FluScrollablePage{ Item{ Layout.fillWidth: true - height: 320 + Layout.preferredHeight: 320 Image { id: bg fillMode:Image.PreserveAspectCrop @@ -77,6 +77,7 @@ FluScrollablePage{ anchors.fill: parent tintColor: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1) target: bg + tintOpacity: FluTheme.dark ? 0.8 : 0.9 blurRadius : 40 targetRect: Qt.rect(list.x-list.contentX+10+(control.width)*index,list.y+10,width,height) } @@ -86,14 +87,14 @@ FluScrollablePage{ color:{ if(FluTheme.dark){ if(item_mouse.containsMouse){ - return Qt.rgba(1,1,1,0.06) + return Qt.rgba(1,1,1,0.03) } - return Qt.rgba(0,0,0,0.03) + return Qt.rgba(0,0,0,0.0) }else{ if(item_mouse.containsMouse){ - return Qt.rgba(0,0,0,0.09) + return Qt.rgba(0,0,0,0.03) } - return Qt.rgba(0,0,0,0.06) + return Qt.rgba(0,0,0,0.0) } } } @@ -135,10 +136,11 @@ FluScrollablePage{ id:item_mouse anchors.fill: parent hoverEnabled: true - onWheel: (wheel)=>{ - if (wheel.angleDelta.y > 0) scrollbar_header.decrease() - else scrollbar_header.increase() - } + onWheel: + (wheel)=>{ + if (wheel.angleDelta.y > 0) scrollbar_header.decrease() + else scrollbar_header.increase() + } onClicked: { Qt.openUrlExternally(model.url) } @@ -249,7 +251,7 @@ FluScrollablePage{ GridView{ Layout.fillWidth: true - implicitHeight: contentHeight + Layout.preferredHeight: contentHeight cellHeight: 120 cellWidth: 320 model:ItemsOriginal.getRecentlyAddedData() @@ -266,7 +268,7 @@ FluScrollablePage{ GridView{ Layout.fillWidth: true - implicitHeight: contentHeight + Layout.preferredHeight: contentHeight cellHeight: 120 cellWidth: 320 interactive: false diff --git a/example/qml/page/T_Timeline.qml b/example/qml/page/T_Timeline.qml index 3ecb823c..9dda8c10 100644 --- a/example/qml/page/T_Timeline.qml +++ b/example/qml/page/T_Timeline.qml @@ -24,7 +24,7 @@ FluScrollablePage{ id:com_lable FluText{ wrapMode: Text.WrapAnywhere - horizontalAlignment: textAlignment + horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft text: modelData.lable color: FluTheme.primaryColor.dark MouseArea{ @@ -41,7 +41,7 @@ FluScrollablePage{ id:com_text FluText{ wrapMode: Text.WrapAnywhere - horizontalAlignment: textAlignment + horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft text: modelData.text font.bold: true MouseArea{ diff --git a/src/imports/FluentUI/Controls/FluAcrylic.qml b/src/imports/FluentUI/Controls/FluAcrylic.qml index 244f0ea7..810e3057 100644 --- a/src/imports/FluentUI/Controls/FluAcrylic.qml +++ b/src/imports/FluentUI/Controls/FluAcrylic.qml @@ -25,7 +25,7 @@ FluItem { } Rectangle{ anchors.fill: parent - color: Qt.rgba(255, 255, 255, luminosity) + color: Qt.rgba(1, 1, 1, luminosity) } Rectangle{ anchors.fill: parent diff --git a/src/imports/FluentUI/Controls/FluNavigationView.qml b/src/imports/FluentUI/Controls/FluNavigationView.qml index 9262c603..b5c2003a 100644 --- a/src/imports/FluentUI/Controls/FluNavigationView.qml +++ b/src/imports/FluentUI/Controls/FluNavigationView.qml @@ -66,10 +66,6 @@ Item { } return data } - function refreshWindow(){ - Window.window.height = Window.window.height-1 - Window.window.height = Window.window.height+1 - } } Component.onCompleted: { d.displayMode = Qt.binding(function(){ @@ -713,11 +709,6 @@ Item { NumberAnimation{ duration: 167 easing.type: Easing.OutCubic - onRunningChanged: { - if(!running){ - d.refreshWindow() - } - } } } Behavior on x { @@ -725,11 +716,6 @@ Item { NumberAnimation{ duration: 167 easing.type: Easing.OutCubic - onRunningChanged: { - if(!running){ - d.refreshWindow() - } - } } } visible: { diff --git a/src/imports/FluentUI/Controls/FluTimeline.qml b/src/imports/FluentUI/Controls/FluTimeline.qml index f8d428eb..298ae8f1 100644 --- a/src/imports/FluentUI/Controls/FluTimeline.qml +++ b/src/imports/FluentUI/Controls/FluTimeline.qml @@ -90,7 +90,7 @@ Item{ id:com_lable FluText{ wrapMode: Text.WrapAnywhere - horizontalAlignment: textAlignment + horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft text: modelData.lable color: FluTheme.primaryColor.dark } @@ -98,13 +98,11 @@ Item{ Component{ id:com_text - FluText{ wrapMode: Text.WrapAnywhere - horizontalAlignment: textAlignment + horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft text: modelData.text } - } Column{ @@ -152,7 +150,7 @@ Item{ Loader{ property var modelData: control.model.get(index) - property int textAlignment: state === "Right" ? Qt.AlignRight : Qt.AlignLeft + property bool isRight: state === "Right" id:loader_lable sourceComponent: { if(!modelData){ @@ -223,7 +221,7 @@ Item{ Loader{ id:loader_text property var modelData: control.model.get(index) - property int textAlignment: state === "Right" ? Qt.AlignRight : Qt.AlignLeft + property bool isRight: state === "Right" state: { if(d.isRight){ return "Right" diff --git a/src/imports/FluentUI/Controls/FluTour.qml b/src/imports/FluentUI/Controls/FluTour.qml index 6d6cdf8a..a4838509 100644 --- a/src/imports/FluentUI/Controls/FluTour.qml +++ b/src/imports/FluentUI/Controls/FluTour.qml @@ -58,9 +58,18 @@ Popup{ target: d.window function onWidthChanged(){ canvas.requestPaint() + timer_delay.restart() } function onHeightChanged(){ canvas.requestPaint() + timer_delay.restart() + } + } + Timer{ + id:timer_delay + interval: 200 + onTriggered: { + canvas.requestPaint() } } Canvas{