From 24f3cb1027f71f36f99e336a397640221e6957f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Fri, 8 Sep 2023 22:33:23 +0800 Subject: [PATCH] update --- example/qml-Qt6/page/T_Acrylic.qml | 2 +- example/qml-Qt6/page/T_Carousel.qml | 109 ++++++++++-------- example/qml-Qt6/page/T_Home.qml | 6 +- example/qml-Qt6/page/T_Rectangle.qml | 2 +- example/qml-Qt6/page/T_Screenshot.qml | 3 +- example/qml-Qt6/window/MainWindow.qml | 4 +- example/qml/page/T_Acrylic.qml | 2 +- example/qml/page/T_Carousel.qml | 109 ++++++++++-------- example/qml/page/T_Home.qml | 6 +- example/qml/page/T_Rectangle.qml | 2 +- example/qml/page/T_Screenshot.qml | 3 +- example/qml/window/MainWindow.qml | 6 +- .../FluentUI/Controls/FluCalendarPicker.qml | 2 - .../FluentUI/Controls/FluCalendarView.qml | 6 +- .../imports/FluentUI/Controls/FluChart.qml | 3 +- .../FluentUI/Controls/FluColorView.qml | 7 +- .../FluentUI/Controls/FluScrollBar.qml | 40 +++---- .../imports/FluentUI/Controls/FluShadow.qml | 10 +- .../FluentUI/Controls/FluCalendarPicker.qml | 2 - .../FluentUI/Controls/FluCalendarView.qml | 6 +- .../imports/FluentUI/Controls/FluChart.qml | 2 +- .../FluentUI/Controls/FluColorView.qml | 7 +- .../FluentUI/Controls/FluScrollBar.qml | 40 +++---- .../imports/FluentUI/Controls/FluShadow.qml | 10 +- 24 files changed, 207 insertions(+), 182 deletions(-) diff --git a/example/qml-Qt6/page/T_Acrylic.qml b/example/qml-Qt6/page/T_Acrylic.qml index ae83a596..c7c94636 100644 --- a/example/qml-Qt6/page/T_Acrylic.qml +++ b/example/qml-Qt6/page/T_Acrylic.qml @@ -50,7 +50,7 @@ FluScrollablePage{ FluRectangle{ width: 1920/4 height: 1200/4 - radius:[15,15,15,15] + radius:[8,8,8,8] Image { id:image asynchronous: true diff --git a/example/qml-Qt6/page/T_Carousel.qml b/example/qml-Qt6/page/T_Carousel.qml index 75cc647c..b03ef13e 100644 --- a/example/qml-Qt6/page/T_Carousel.qml +++ b/example/qml-Qt6/page/T_Carousel.qml @@ -36,20 +36,28 @@ FluScrollablePage{ FluText{ text:"轮播图,支持无限轮播,无限滑动,用ListView实现的组件" } - FluCarousel{ - radius:[5,5,5,5] - delegate: Component{ - Image { - anchors.fill: parent - source: model.url - asynchronous: true - fillMode:Image.PreserveAspectCrop - } + Item{ + width: 400 + height: 300 + FluShadow{ + radius: 8 } - Layout.topMargin: 20 - Layout.leftMargin: 5 - Component.onCompleted: { - model = [{url:"qrc:/example/res/image/banner_1.jpg"},{url:"qrc:/example/res/image/banner_2.jpg"},{url:"qrc:/example/res/image/banner_3.jpg"}] + FluCarousel{ + anchors.fill: parent + radius:[8,8,8,8] + delegate: Component{ + Image { + anchors.fill: parent + source: model.url + asynchronous: true + fillMode:Image.PreserveAspectCrop + } + } + Layout.topMargin: 20 + Layout.leftMargin: 5 + Component.onCompleted: { + model = [{url:"qrc:/example/res/image/banner_1.jpg"},{url:"qrc:/example/res/image/banner_2.jpg"},{url:"qrc:/example/res/image/banner_3.jpg"}] + } } } } @@ -66,46 +74,55 @@ FluScrollablePage{ verticalCenter: parent.verticalCenter left:parent.left } - FluCarousel{ - radius:[15,15,15,15] - loopTime:1500 - indicatorGravity: Qt.AlignHCenter | Qt.AlignTop - indicatorMarginTop:15 - delegate: Component{ - Item{ - anchors.fill: parent - Image { + Item{ + width: 400 + height: 300 + FluShadow{ + radius: 8 + } + FluCarousel{ + anchors.fill: parent + radius:[8,8,8,8] + loopTime:1500 + indicatorGravity: Qt.AlignHCenter | Qt.AlignTop + indicatorMarginTop:15 + delegate: Component{ + Item{ anchors.fill: parent - source: model.url - asynchronous: true - fillMode:Image.PreserveAspectCrop - } - Rectangle{ - height: 40 - width: parent.width - anchors.bottom: parent.bottom - color: "#33000000" - FluText{ + Image { anchors.fill: parent - verticalAlignment: Qt.AlignVCenter - horizontalAlignment: Qt.AlignHCenter - text:model.title - color: FluColors.Grey10 - font.pixelSize: 15 + source: model.url + asynchronous: true + fillMode:Image.PreserveAspectCrop + } + Rectangle{ + height: 40 + width: parent.width + anchors.bottom: parent.bottom + color: "#33000000" + FluText{ + anchors.fill: parent + verticalAlignment: Qt.AlignVCenter + horizontalAlignment: Qt.AlignHCenter + text:model.title + color: FluColors.Grey10 + font.pixelSize: 15 + } } } } - } - Layout.topMargin: 20 - Layout.leftMargin: 5 - Component.onCompleted: { - var arr = [] - arr.push({url:"qrc:/example/res/image/banner_1.jpg",title:"共同应对全球性问题"}) - arr.push({url:"qrc:/example/res/image/banner_2.jpg",title:"三小只全程没互动"}) - arr.push({url:"qrc:/example/res/image/banner_3.jpg",title:"有效投资扩大 激发增长动能"}) - model = arr + Layout.topMargin: 20 + Layout.leftMargin: 5 + Component.onCompleted: { + var arr = [] + arr.push({url:"qrc:/example/res/image/banner_1.jpg",title:"共同应对全球性问题"}) + arr.push({url:"qrc:/example/res/image/banner_2.jpg",title:"三小只全程没互动"}) + arr.push({url:"qrc:/example/res/image/banner_3.jpg",title:"有效投资扩大 激发增长动能"}) + model = arr + } } } + } } diff --git a/example/qml-Qt6/page/T_Home.qml b/example/qml-Qt6/page/T_Home.qml index d10a0e0b..360ca074 100644 --- a/example/qml-Qt6/page/T_Home.qml +++ b/example/qml-Qt6/page/T_Home.qml @@ -70,12 +70,12 @@ FluScrollablePage{ width: 220 height: 240 FluShadow{ - radius:8 + radius:5 anchors.fill: item_content } FluItem{ id:item_content - radius: [8,8,8,8] + radius: [5,5,5,5] width: 200 height: 220 anchors.centerIn: parent @@ -89,7 +89,7 @@ FluScrollablePage{ } Rectangle{ anchors.fill: parent - radius: 8 + radius: 5 color:{ if(FluTheme.dark){ if(item_mouse.containsMouse){ diff --git a/example/qml-Qt6/page/T_Rectangle.qml b/example/qml-Qt6/page/T_Rectangle.qml index 9cfe42aa..16be4798 100644 --- a/example/qml-Qt6/page/T_Rectangle.qml +++ b/example/qml-Qt6/page/T_Rectangle.qml @@ -116,7 +116,7 @@ FluScrollablePage{ FluRectangle{ width: 1920/5 height: 1200/5 - radius:[15,15,15,15] + radius:[8,8,8,8] Image { asynchronous: true source: "qrc:/example/res/image/banner_1.jpg" diff --git a/example/qml-Qt6/page/T_Screenshot.qml b/example/qml-Qt6/page/T_Screenshot.qml index 1a5cf38f..eb3808c6 100644 --- a/example/qml-Qt6/page/T_Screenshot.qml +++ b/example/qml-Qt6/page/T_Screenshot.qml @@ -30,9 +30,10 @@ FluScrollablePage{ Layout.topMargin: 10 Layout.leftMargin: 4 Layout.bottomMargin: 4 + radius: 4 color: FluTheme.dark ? FluColors.Black : FluColors.White FluShadow{ - radius: 0 + radius: 4 color: FluTheme.primaryColor.dark } Image{ diff --git a/example/qml-Qt6/window/MainWindow.qml b/example/qml-Qt6/window/MainWindow.qml index d84e0aec..953b291e 100644 --- a/example/qml-Qt6/window/MainWindow.qml +++ b/example/qml-Qt6/window/MainWindow.qml @@ -164,9 +164,9 @@ CustomWindow { height: parent.height z:999 //Stack模式,每次切换都会将页面压入栈中,随着栈的页面增多,消耗的内存也越多,内存消耗多就会卡顿,这时候就需要按返回将页面pop掉,释放内存。该模式可以配合FluPage中的launchMode属性,设置页面的启动模式 - pageMode: FluNavigationViewType.Stack + // pageMode: FluNavigationViewType.Stack //NoStack模式,每次切换都会销毁之前的页面然后创建一个新的页面,只需消耗少量内存(推荐) - // pageMode: FluNavigationViewType.NoStack + pageMode: FluNavigationViewType.NoStack items: ItemsOriginal footerItems:ItemsFooter topPadding:FluTools.isMacos() ? 20 : 0 diff --git a/example/qml/page/T_Acrylic.qml b/example/qml/page/T_Acrylic.qml index d34c0a86..fe1cc0bd 100644 --- a/example/qml/page/T_Acrylic.qml +++ b/example/qml/page/T_Acrylic.qml @@ -51,7 +51,7 @@ FluScrollablePage{ FluRectangle{ width: 1920/4 height: 1200/4 - radius:[15,15,15,15] + radius:[8,8,8,8] Image { id:image asynchronous: true diff --git a/example/qml/page/T_Carousel.qml b/example/qml/page/T_Carousel.qml index 30373b32..22a25037 100644 --- a/example/qml/page/T_Carousel.qml +++ b/example/qml/page/T_Carousel.qml @@ -37,20 +37,28 @@ FluScrollablePage{ FluText{ text:"轮播图,支持无限轮播,无限滑动,用ListView实现的组件" } - FluCarousel{ - radius:[5,5,5,5] - delegate: Component{ - Image { - anchors.fill: parent - source: model.url - asynchronous: true - fillMode:Image.PreserveAspectCrop - } + Item{ + width: 400 + height: 300 + FluShadow{ + radius: 8 } - Layout.topMargin: 20 - Layout.leftMargin: 5 - Component.onCompleted: { - model = [{url:"qrc:/example/res/image/banner_1.jpg"},{url:"qrc:/example/res/image/banner_2.jpg"},{url:"qrc:/example/res/image/banner_3.jpg"}] + FluCarousel{ + anchors.fill: parent + radius:[8,8,8,8] + delegate: Component{ + Image { + anchors.fill: parent + source: model.url + asynchronous: true + fillMode:Image.PreserveAspectCrop + } + } + Layout.topMargin: 20 + Layout.leftMargin: 5 + Component.onCompleted: { + model = [{url:"qrc:/example/res/image/banner_1.jpg"},{url:"qrc:/example/res/image/banner_2.jpg"},{url:"qrc:/example/res/image/banner_3.jpg"}] + } } } } @@ -67,46 +75,55 @@ FluScrollablePage{ verticalCenter: parent.verticalCenter left:parent.left } - FluCarousel{ - radius:[15,15,15,15] - loopTime:1500 - indicatorGravity: Qt.AlignHCenter | Qt.AlignTop - indicatorMarginTop:15 - delegate: Component{ - Item{ - anchors.fill: parent - Image { + Item{ + width: 400 + height: 300 + FluShadow{ + radius: 8 + } + FluCarousel{ + anchors.fill: parent + radius:[8,8,8,8] + loopTime:1500 + indicatorGravity: Qt.AlignHCenter | Qt.AlignTop + indicatorMarginTop:15 + delegate: Component{ + Item{ anchors.fill: parent - source: model.url - asynchronous: true - fillMode:Image.PreserveAspectCrop - } - Rectangle{ - height: 40 - width: parent.width - anchors.bottom: parent.bottom - color: "#33000000" - FluText{ + Image { anchors.fill: parent - verticalAlignment: Qt.AlignVCenter - horizontalAlignment: Qt.AlignHCenter - text:model.title - color: FluColors.Grey10 - font.pixelSize: 15 + source: model.url + asynchronous: true + fillMode:Image.PreserveAspectCrop + } + Rectangle{ + height: 40 + width: parent.width + anchors.bottom: parent.bottom + color: "#33000000" + FluText{ + anchors.fill: parent + verticalAlignment: Qt.AlignVCenter + horizontalAlignment: Qt.AlignHCenter + text:model.title + color: FluColors.Grey10 + font.pixelSize: 15 + } } } } - } - Layout.topMargin: 20 - Layout.leftMargin: 5 - Component.onCompleted: { - var arr = [] - arr.push({url:"qrc:/example/res/image/banner_1.jpg",title:"共同应对全球性问题"}) - arr.push({url:"qrc:/example/res/image/banner_2.jpg",title:"三小只全程没互动"}) - arr.push({url:"qrc:/example/res/image/banner_3.jpg",title:"有效投资扩大 激发增长动能"}) - model = arr + Layout.topMargin: 20 + Layout.leftMargin: 5 + Component.onCompleted: { + var arr = [] + arr.push({url:"qrc:/example/res/image/banner_1.jpg",title:"共同应对全球性问题"}) + arr.push({url:"qrc:/example/res/image/banner_2.jpg",title:"三小只全程没互动"}) + arr.push({url:"qrc:/example/res/image/banner_3.jpg",title:"有效投资扩大 激发增长动能"}) + model = arr + } } } + } } diff --git a/example/qml/page/T_Home.qml b/example/qml/page/T_Home.qml index ac1d68e3..061ede93 100644 --- a/example/qml/page/T_Home.qml +++ b/example/qml/page/T_Home.qml @@ -71,12 +71,12 @@ FluScrollablePage{ width: 220 height: 240 FluShadow{ - radius:8 + radius:5 anchors.fill: item_content } FluItem{ id:item_content - radius: [8,8,8,8] + radius: [5,5,5,5] width: 200 height: 220 anchors.centerIn: parent @@ -90,7 +90,7 @@ FluScrollablePage{ } Rectangle{ anchors.fill: parent - radius: 8 + radius: 5 color:{ if(FluTheme.dark){ if(item_mouse.containsMouse){ diff --git a/example/qml/page/T_Rectangle.qml b/example/qml/page/T_Rectangle.qml index 905d9553..bd6c8a6e 100644 --- a/example/qml/page/T_Rectangle.qml +++ b/example/qml/page/T_Rectangle.qml @@ -117,7 +117,7 @@ FluScrollablePage{ FluRectangle{ width: 1920/5 height: 1200/5 - radius:[15,15,15,15] + radius:[8,8,8,8] Image { asynchronous: true source: "qrc:/example/res/image/banner_1.jpg" diff --git a/example/qml/page/T_Screenshot.qml b/example/qml/page/T_Screenshot.qml index df25546e..3b4cd1dc 100644 --- a/example/qml/page/T_Screenshot.qml +++ b/example/qml/page/T_Screenshot.qml @@ -31,9 +31,10 @@ FluScrollablePage{ Layout.topMargin: 10 Layout.leftMargin: 4 Layout.bottomMargin: 4 + radius: 4 color: FluTheme.dark ? FluColors.Black : FluColors.White FluShadow{ - radius: 0 + radius: 4 color: FluTheme.primaryColor.dark } Image{ diff --git a/example/qml/window/MainWindow.qml b/example/qml/window/MainWindow.qml index 634784b4..5efebdb6 100644 --- a/example/qml/window/MainWindow.qml +++ b/example/qml/window/MainWindow.qml @@ -139,7 +139,7 @@ CustomWindow { id:loader lazy: true anchors.fill: parent - source: "https://zhu-zichu.gitee.io/Qt6_156_LieflatPage.qml" + source: "https://zhu-zichu.gitee.io/Qt5_156_LieflatPage.qml" } } front: Item{ @@ -165,9 +165,9 @@ CustomWindow { height: parent.height z:999 //Stack模式,每次切换都会将页面压入栈中,随着栈的页面增多,消耗的内存也越多,内存消耗多就会卡顿,这时候就需要按返回将页面pop掉,释放内存。该模式可以配合FluPage中的launchMode属性,设置页面的启动模式 - pageMode: FluNavigationViewType.Stack + // pageMode: FluNavigationViewType.Stack //NoStack模式,每次切换都会销毁之前的页面然后创建一个新的页面,只需消耗少量内存(推荐) - // pageMode: FluNavigationViewType.NoStack + pageMode: FluNavigationViewType.NoStack items: ItemsOriginal footerItems:ItemsFooter topPadding:FluTools.isMacos() ? 20 : 0 diff --git a/src/Qt5/imports/FluentUI/Controls/FluCalendarPicker.qml b/src/Qt5/imports/FluentUI/Controls/FluCalendarPicker.qml index 8ca2a083..ac5ba8d9 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluCalendarPicker.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluCalendarPicker.qml @@ -23,7 +23,6 @@ Rectangle { radius: 4 border.width: 1 border.color: dividerColor - Component.onCompleted: { if(current){ const date = current @@ -33,7 +32,6 @@ Rectangle { text_date.text = year+"-"+(month+1)+"-"+day } } - MouseArea{ id:mouse_area hoverEnabled: true diff --git a/src/Qt5/imports/FluentUI/Controls/FluCalendarView.qml b/src/Qt5/imports/FluentUI/Controls/FluCalendarView.qml index cfc1fcf1..910c158d 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluCalendarView.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluCalendarView.qml @@ -7,6 +7,7 @@ Item { property var date: new Date() property var currentDate : new Date() property var toDay: new Date() + property int radius: 5 signal dateClicked(var date) id:control width: 280 @@ -214,10 +215,7 @@ Item { } FluArea{ anchors.fill: parent - radius: 5 - FluShadow{ - radius: 5 - } + radius: control.radius Rectangle{ id:layout_divider height: 1 diff --git a/src/Qt5/imports/FluentUI/Controls/FluChart.qml b/src/Qt5/imports/FluentUI/Controls/FluChart.qml index 5fb0a410..6ec0a34a 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluChart.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluChart.qml @@ -22,7 +22,6 @@ Canvas { jsChart.update(); chartAnimator.restart(); } - opacity: MouseArea { id: event anchors.fill: control @@ -90,7 +89,7 @@ Canvas { control.requestPaint(); } onPaint: { - if(control.getContext('2d') !== null && memorizedContext !== control.getContext('2d') || memorizedData !== control.chartData || memorizedOptions !== control.chartOptions) { + if(control.getContext('2d') !== null && memorizedContext !== control.getContext('2d') || memorizedData !== control.chartData || memorizedOptions !== control.chartOptions) { var ctx = control.getContext('2d'); jsChart = Chart.build(ctx, { diff --git a/src/Qt5/imports/FluentUI/Controls/FluColorView.qml b/src/Qt5/imports/FluentUI/Controls/FluColorView.qml index d3b023c2..355046b4 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluColorView.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluColorView.qml @@ -4,15 +4,14 @@ import FluentUI 1.0 import "ColorPicker" Item { + id:control property alias colorValue: color_picker.colorValue + property int radius: 5 width: color_picker.width+10 height: color_picker.height FluArea{ anchors.fill: parent - radius: 5 - FluShadow{ - radius: 5 - } + radius: control.radius ColorPicker{ id:color_picker } diff --git a/src/Qt5/imports/FluentUI/Controls/FluScrollBar.qml b/src/Qt5/imports/FluentUI/Controls/FluScrollBar.qml index 292a8232..2057963f 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluScrollBar.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluScrollBar.qml @@ -20,12 +20,12 @@ T.ScrollBar { property int minLine : 2 property int maxLine : 6 } - verticalPadding : vertical ? 15 : 2 - horizontalPadding : horizontal ? 15 : 2 + verticalPadding : vertical ? 15 : 3 + horizontalPadding : horizontal ? 15 : 3 background: Rectangle{ id:back_rect radius: 5 - color:FluTheme.dark ? Qt.rgba(44/255,44/255,44/255,1) : Qt.rgba(255/255,255/255,255/255,1) + color:FluTheme.dark ? Qt.rgba(44/255,44/255,44/255,1) : Qt.rgba(255/255,255/255,255/255,1) opacity:{ if(vertical){ return d.maxLine === Number(rect_bar.width) @@ -34,21 +34,21 @@ T.ScrollBar { } Behavior on opacity { NumberAnimation{ - duration: 167 + duration: 50 } } } FluIconButton{ - width: 10 - height: 10 - iconSize: 6 + width: 12 + height: 12 + iconSize: 8 verticalPadding: 0 horizontalPadding: 0 visible: control.horizontal opacity: back_rect.opacity anchors{ left: parent.left - leftMargin: 4 + leftMargin: 2 verticalCenter: parent.verticalCenter } iconColor: control.color @@ -58,16 +58,16 @@ T.ScrollBar { } } FluIconButton{ - width: 10 - height: 10 - iconSize: 6 + width: 12 + height: 12 + iconSize: 8 verticalPadding: 0 horizontalPadding: 0 iconColor: control.color opacity: back_rect.opacity anchors{ right: parent.right - rightMargin: 4 + rightMargin: 2 verticalCenter: parent.verticalCenter } visible: control.horizontal @@ -77,16 +77,16 @@ T.ScrollBar { } } FluIconButton{ - width: 10 - height: 10 - iconSize: 6 + width: 12 + height: 12 + iconSize: 8 verticalPadding: 0 horizontalPadding: 0 iconColor: control.color opacity: back_rect.opacity anchors{ top: parent.top - topMargin: 4 + topMargin: 2 horizontalCenter: parent.horizontalCenter } visible: control.vertical @@ -96,16 +96,16 @@ T.ScrollBar { } } FluIconButton{ - width: 10 - height: 10 - iconSize: 6 + width: 12 + height: 12 + iconSize: 8 verticalPadding: 0 horizontalPadding: 0 iconColor: control.color opacity: back_rect.opacity anchors{ bottom: parent.bottom - bottomMargin: 4 + bottomMargin: 2 horizontalCenter: parent.horizontalCenter } visible: control.vertical diff --git a/src/Qt5/imports/FluentUI/Controls/FluShadow.qml b/src/Qt5/imports/FluentUI/Controls/FluShadow.qml index 41b03992..b16e73e6 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluShadow.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluShadow.qml @@ -4,8 +4,8 @@ import FluentUI 1.0 Item { //高性能阴影!!!比DropShadow阴影性能高出数倍!!! - property color color: FluTheme.dark ? "#999999" : "#999999" - property int elevation: 5 + property color color: FluTheme.dark ? "#FFFFFF" : "#999999" + property int elevation: 6 property int radius: 4 id:control anchors.fill: parent @@ -14,9 +14,9 @@ Item { Rectangle{ anchors.fill: parent color: "#00000000" - opacity: 0.02 * (elevation-index+1) - anchors.margins: -index+1 - radius: control.radius + opacity: 0.01 * (elevation-index+1) + anchors.margins: -index + radius: control.radius+index border.width: index border.color: control.color } diff --git a/src/Qt6/imports/FluentUI/Controls/FluCalendarPicker.qml b/src/Qt6/imports/FluentUI/Controls/FluCalendarPicker.qml index 9e00174c..89415090 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluCalendarPicker.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluCalendarPicker.qml @@ -23,7 +23,6 @@ Rectangle { radius: 4 border.width: 1 border.color: dividerColor - Component.onCompleted: { if(current){ const date = current @@ -33,7 +32,6 @@ Rectangle { text_date.text = year+"-"+(month+1)+"-"+day } } - MouseArea{ id:mouse_area hoverEnabled: true diff --git a/src/Qt6/imports/FluentUI/Controls/FluCalendarView.qml b/src/Qt6/imports/FluentUI/Controls/FluCalendarView.qml index c646996f..5bec4ec2 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluCalendarView.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluCalendarView.qml @@ -7,6 +7,7 @@ Item { property var date: new Date() property var currentDate : new Date() property var toDay: new Date() + property int radius: 5 signal dateClicked(var date) id:control width: 280 @@ -214,10 +215,7 @@ Item { } FluArea{ anchors.fill: parent - radius: 5 - FluShadow{ - radius: 5 - } + radius: control.radius Rectangle{ id:layout_divider height: 1 diff --git a/src/Qt6/imports/FluentUI/Controls/FluChart.qml b/src/Qt6/imports/FluentUI/Controls/FluChart.qml index 7dbae7fb..ae2ee320 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluChart.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluChart.qml @@ -1,4 +1,4 @@ -import QtQuick 2.13 +import QtQuick import "./../JS/Chart.js" as Chart Canvas { diff --git a/src/Qt6/imports/FluentUI/Controls/FluColorView.qml b/src/Qt6/imports/FluentUI/Controls/FluColorView.qml index daa45030..791b7332 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluColorView.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluColorView.qml @@ -4,15 +4,14 @@ import FluentUI import "ColorPicker" Item { + id:control property alias colorValue: color_picker.colorValue + property int radius: 5 width: color_picker.width+10 height: color_picker.height FluArea{ anchors.fill: parent - radius: 5 - FluShadow{ - radius: 5 - } + radius: control.radius ColorPicker{ id:color_picker } diff --git a/src/Qt6/imports/FluentUI/Controls/FluScrollBar.qml b/src/Qt6/imports/FluentUI/Controls/FluScrollBar.qml index 1dc079d3..066f7d56 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluScrollBar.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluScrollBar.qml @@ -21,12 +21,12 @@ T.ScrollBar { property int minLine : 2 property int maxLine : 6 } - verticalPadding : vertical ? 15 : 2 - horizontalPadding : horizontal ? 15 : 2 + verticalPadding : vertical ? 15 : 3 + horizontalPadding : horizontal ? 15 : 3 background: Rectangle{ id:back_rect radius: 5 - color:FluTheme.dark ? Qt.rgba(44/255,44/255,44/255,1) : Qt.rgba(255/255,255/255,255/255,1) + color:FluTheme.dark ? Qt.rgba(44/255,44/255,44/255,1) : Qt.rgba(255/255,255/255,255/255,1) opacity:{ if(vertical){ return d.maxLine === Number(rect_bar.width) @@ -35,21 +35,21 @@ T.ScrollBar { } Behavior on opacity { NumberAnimation{ - duration: 167 + duration: 50 } } } FluIconButton{ - width: 10 - height: 10 - iconSize: 6 + width: 12 + height: 12 + iconSize: 8 verticalPadding: 0 horizontalPadding: 0 visible: control.horizontal opacity: back_rect.opacity anchors{ left: parent.left - leftMargin: 4 + leftMargin: 2 verticalCenter: parent.verticalCenter } iconColor: control.color @@ -59,16 +59,16 @@ T.ScrollBar { } } FluIconButton{ - width: 10 - height: 10 - iconSize: 6 + width: 12 + height: 12 + iconSize: 8 verticalPadding: 0 horizontalPadding: 0 iconColor: control.color opacity: back_rect.opacity anchors{ right: parent.right - rightMargin: 4 + rightMargin: 2 verticalCenter: parent.verticalCenter } visible: control.horizontal @@ -78,16 +78,16 @@ T.ScrollBar { } } FluIconButton{ - width: 10 - height: 10 - iconSize: 6 + width: 12 + height: 12 + iconSize: 8 verticalPadding: 0 horizontalPadding: 0 iconColor: control.color opacity: back_rect.opacity anchors{ top: parent.top - topMargin: 4 + topMargin: 2 horizontalCenter: parent.horizontalCenter } visible: control.vertical @@ -97,16 +97,16 @@ T.ScrollBar { } } FluIconButton{ - width: 10 - height: 10 - iconSize: 6 + width: 12 + height: 12 + iconSize: 8 verticalPadding: 0 horizontalPadding: 0 iconColor: control.color opacity: back_rect.opacity anchors{ bottom: parent.bottom - bottomMargin: 4 + bottomMargin: 2 horizontalCenter: parent.horizontalCenter } visible: control.vertical diff --git a/src/Qt6/imports/FluentUI/Controls/FluShadow.qml b/src/Qt6/imports/FluentUI/Controls/FluShadow.qml index 8601958e..af236e1e 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluShadow.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluShadow.qml @@ -4,8 +4,8 @@ import FluentUI Item { //高性能阴影!!!比DropShadow阴影性能高出数倍!!! - property color color: FluTheme.dark ? "#999999" : "#999999" - property int elevation: 5 + property color color: FluTheme.dark ? "#FFFFFF" : "#999999" + property int elevation: 6 property int radius: 4 id:control anchors.fill: parent @@ -14,9 +14,9 @@ Item { Rectangle{ anchors.fill: parent color: "#00000000" - opacity: 0.02 * (elevation-index+1) - anchors.margins: -index+1 - radius: control.radius + opacity: 0.01 * (elevation-index+1) + anchors.margins: -index + radius: control.radius+index border.width: index border.color: control.color }