mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-25 20:31:35 +08:00
update
This commit is contained in:
parent
e1292966c1
commit
752fe8cfba
@ -288,3 +288,28 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
************************************************************************************
|
||||
qml-colorpicker
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Ruslan Shestopalyuk
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -11,6 +11,7 @@ FluContentPage{
|
||||
|
||||
title:"Http"
|
||||
property string cacheDirPath: FluTools.getApplicationDirPath() + "/cache/http"
|
||||
property bool isDownCompleted: false
|
||||
|
||||
FluHttp{
|
||||
id:http
|
||||
@ -171,6 +172,10 @@ FluContentPage{
|
||||
}
|
||||
onSuccess:
|
||||
(result)=>{
|
||||
if(!isDownCompleted){
|
||||
tour.open()
|
||||
isDownCompleted = true
|
||||
}
|
||||
showSuccess(result)
|
||||
}
|
||||
onDownloadProgress:
|
||||
@ -281,6 +286,13 @@ FluContentPage{
|
||||
}
|
||||
}
|
||||
|
||||
FluTour{
|
||||
id:tour
|
||||
steps:[
|
||||
{title:"友情提示",description: "下载已完成,左击这里可以打开文件所在路径,右击可以弹出菜单删除文件!",target:()=>btn_breakpoint_download}
|
||||
]
|
||||
}
|
||||
|
||||
HttpCallable{
|
||||
id:callable_upload
|
||||
onStart: {
|
||||
|
@ -12,6 +12,7 @@ FluContentPage{
|
||||
|
||||
title:"Http"
|
||||
property string cacheDirPath: FluTools.getApplicationDirPath() + "/cache/http"
|
||||
property bool isDownCompleted: false
|
||||
|
||||
FluHttp{
|
||||
id:http
|
||||
@ -172,6 +173,10 @@ FluContentPage{
|
||||
}
|
||||
onSuccess:
|
||||
(result)=>{
|
||||
if(!isDownCompleted){
|
||||
tour.open()
|
||||
isDownCompleted = true
|
||||
}
|
||||
showSuccess(result)
|
||||
}
|
||||
onDownloadProgress:
|
||||
@ -282,6 +287,13 @@ FluContentPage{
|
||||
}
|
||||
}
|
||||
|
||||
FluTour{
|
||||
id:tour
|
||||
steps:[
|
||||
{title:"友情提示",description: "下载已完成,左击这里可以打开文件所在路径,右击可以弹出菜单删除文件!",target:()=>btn_breakpoint_download}
|
||||
]
|
||||
}
|
||||
|
||||
HttpCallable{
|
||||
id:callable_upload
|
||||
onStart: {
|
||||
|
@ -8,7 +8,10 @@
|
||||
FluCaptcha::FluCaptcha(QQuickItem *parent)
|
||||
: QQuickPaintedItem(parent)
|
||||
{
|
||||
font(QFont("楷体",25,QFont::Bold,true));
|
||||
QFont fontStype;
|
||||
fontStype.setPixelSize(28);
|
||||
fontStype.setBold(true);
|
||||
font(fontStype);
|
||||
setWidth(180);
|
||||
setHeight(80);
|
||||
refresh();
|
||||
|
@ -10,7 +10,7 @@ Canvas {
|
||||
property var chartOptions
|
||||
property double chartAnimationProgress: 0.1
|
||||
property int animationEasingType: Easing.InOutExpo
|
||||
property double animationDuration: 500
|
||||
property double animationDuration: 0
|
||||
property var memorizedContext
|
||||
property var memorizedData
|
||||
property var memorizedOptions
|
||||
@ -22,6 +22,7 @@ Canvas {
|
||||
jsChart.update();
|
||||
chartAnimator.restart();
|
||||
}
|
||||
opacity:
|
||||
MouseArea {
|
||||
id: event
|
||||
anchors.fill: control
|
||||
|
@ -13,18 +13,115 @@ T.ScrollBar {
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 2
|
||||
visible: control.policy !== T.ScrollBar.AlwaysOff
|
||||
minimumSize: Math.max(orientation === Qt.Horizontal ? height / width : width / height,0.3)
|
||||
QtObject{
|
||||
id:d
|
||||
property int minLine : 2
|
||||
property int maxLine : 6
|
||||
}
|
||||
verticalPadding : vertical ? 15 : 2
|
||||
horizontalPadding : horizontal ? 15 : 2
|
||||
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)
|
||||
opacity:{
|
||||
if(vertical){
|
||||
return d.maxLine === Number(rect_bar.width)
|
||||
}
|
||||
return d.maxLine === Number(rect_bar.height)
|
||||
}
|
||||
Behavior on opacity {
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
}
|
||||
}
|
||||
}
|
||||
FluIconButton{
|
||||
width: 10
|
||||
height: 10
|
||||
iconSize: 6
|
||||
verticalPadding: 0
|
||||
horizontalPadding: 0
|
||||
visible: control.horizontal
|
||||
opacity: back_rect.opacity
|
||||
anchors{
|
||||
left: parent.left
|
||||
leftMargin: 4
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
iconColor: control.color
|
||||
iconSource: FluentIcons.CaretLeftSolid8
|
||||
onClicked: {
|
||||
control.decrease()
|
||||
}
|
||||
}
|
||||
FluIconButton{
|
||||
width: 10
|
||||
height: 10
|
||||
iconSize: 6
|
||||
verticalPadding: 0
|
||||
horizontalPadding: 0
|
||||
iconColor: control.color
|
||||
opacity: back_rect.opacity
|
||||
anchors{
|
||||
right: parent.right
|
||||
rightMargin: 4
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
visible: control.horizontal
|
||||
iconSource: FluentIcons.CaretRightSolid8
|
||||
onClicked: {
|
||||
control.increase()
|
||||
}
|
||||
}
|
||||
FluIconButton{
|
||||
width: 10
|
||||
height: 10
|
||||
iconSize: 6
|
||||
verticalPadding: 0
|
||||
horizontalPadding: 0
|
||||
iconColor: control.color
|
||||
opacity: back_rect.opacity
|
||||
anchors{
|
||||
top: parent.top
|
||||
topMargin: 4
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
visible: control.vertical
|
||||
iconSource: FluentIcons.CaretUpSolid8
|
||||
onClicked: {
|
||||
control.decrease()
|
||||
}
|
||||
}
|
||||
FluIconButton{
|
||||
width: 10
|
||||
height: 10
|
||||
iconSize: 6
|
||||
verticalPadding: 0
|
||||
horizontalPadding: 0
|
||||
iconColor: control.color
|
||||
opacity: back_rect.opacity
|
||||
anchors{
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 4
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
visible: control.vertical
|
||||
iconSource: FluentIcons.CaretDownSolid8
|
||||
onClicked: {
|
||||
control.increase()
|
||||
}
|
||||
}
|
||||
contentItem: Item {
|
||||
property bool collapsed: (control.policy === T.ScrollBar.AlwaysOn || (control.active && control.size < 1.0))
|
||||
implicitWidth: control.interactive ? 6 : 2
|
||||
implicitHeight: control.interactive ? 6 : 2
|
||||
|
||||
implicitWidth: control.interactive ? d.maxLine : d.minLine
|
||||
implicitHeight: control.interactive ? d.maxLine : d.minLine
|
||||
Rectangle{
|
||||
id:rect_bar
|
||||
width: vertical ? 2 : parent.width
|
||||
height: horizontal ? 2 : parent.height
|
||||
width: vertical ? d.minLine : parent.width
|
||||
height: horizontal ? d.minLine : parent.height
|
||||
color:{
|
||||
if(control.pressed){
|
||||
return control.pressedColor
|
||||
@ -44,8 +141,8 @@ T.ScrollBar {
|
||||
when: contentItem.collapsed
|
||||
PropertyChanges {
|
||||
target: rect_bar
|
||||
width: vertical ? 6 : parent.width
|
||||
height: horizontal ? 6 : parent.height
|
||||
width: vertical ? d.maxLine : parent.width
|
||||
height: horizontal ? d.maxLine : parent.height
|
||||
}
|
||||
}
|
||||
,State{
|
||||
@ -53,8 +150,8 @@ T.ScrollBar {
|
||||
when: !contentItem.collapsed
|
||||
PropertyChanges {
|
||||
target: rect_bar
|
||||
width: vertical ? 2 : parent.width
|
||||
height: horizontal ? 2 : parent.height
|
||||
width: vertical ? d.minLine : parent.width
|
||||
height: horizontal ? d.minLine : parent.height
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -73,6 +170,8 @@ T.ScrollBar {
|
||||
}
|
||||
,Transition {
|
||||
to: "show"
|
||||
SequentialAnimation {
|
||||
PauseAnimation { duration: 450 }
|
||||
NumberAnimation {
|
||||
target: rect_bar
|
||||
properties: vertical ? "width" : "height"
|
||||
@ -80,6 +179,7 @@ T.ScrollBar {
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ FluMenu{
|
||||
text:cutText
|
||||
focus: false
|
||||
padding: 0
|
||||
height: visible ? 34 : 0
|
||||
height: visible ? 36 : 0
|
||||
visible: inputItem.selectedText !== "" && !inputItem.readOnly
|
||||
onClicked: {
|
||||
inputItem.cut()
|
||||
@ -43,7 +43,7 @@ FluMenu{
|
||||
text:copyText
|
||||
focus: false
|
||||
padding: 0
|
||||
height: visible ? 34 : 0
|
||||
height: visible ? 36 : 0
|
||||
visible: inputItem.selectedText !== ""
|
||||
onClicked: {
|
||||
inputItem.copy()
|
||||
@ -55,8 +55,7 @@ FluMenu{
|
||||
text:pasteText
|
||||
focus: false
|
||||
padding: 0
|
||||
height: visible ? 34 : 0
|
||||
visible: inputItem.canPaste
|
||||
height: visible ? 36 : 0
|
||||
onClicked: {
|
||||
inputItem.paste()
|
||||
menu.close()
|
||||
@ -67,7 +66,7 @@ FluMenu{
|
||||
text:selectAllText
|
||||
focus: false
|
||||
padding: 0
|
||||
height: visible ? 34 : 0
|
||||
height: visible ? 36 : 0
|
||||
visible: inputItem.text !== ""
|
||||
onClicked: {
|
||||
inputItem.selectAll()
|
||||
|
@ -10,7 +10,7 @@ Canvas {
|
||||
property var chartOptions
|
||||
property double chartAnimationProgress: 0.1
|
||||
property int animationEasingType: Easing.InOutExpo
|
||||
property double animationDuration: 500
|
||||
property double animationDuration: 0
|
||||
property var memorizedContext
|
||||
property var memorizedData
|
||||
property var memorizedOptions
|
||||
|
@ -14,18 +14,115 @@ T.ScrollBar {
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
padding: 2
|
||||
visible: control.policy !== T.ScrollBar.AlwaysOff
|
||||
minimumSize: Math.max(orientation === Qt.Horizontal ? height / width : width / height,0.3)
|
||||
QtObject{
|
||||
id:d
|
||||
property int minLine : 2
|
||||
property int maxLine : 6
|
||||
}
|
||||
verticalPadding : vertical ? 15 : 2
|
||||
horizontalPadding : horizontal ? 15 : 2
|
||||
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)
|
||||
opacity:{
|
||||
if(vertical){
|
||||
return d.maxLine === Number(rect_bar.width)
|
||||
}
|
||||
return d.maxLine === Number(rect_bar.height)
|
||||
}
|
||||
Behavior on opacity {
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
}
|
||||
}
|
||||
}
|
||||
FluIconButton{
|
||||
width: 10
|
||||
height: 10
|
||||
iconSize: 6
|
||||
verticalPadding: 0
|
||||
horizontalPadding: 0
|
||||
visible: control.horizontal
|
||||
opacity: back_rect.opacity
|
||||
anchors{
|
||||
left: parent.left
|
||||
leftMargin: 4
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
iconColor: control.color
|
||||
iconSource: FluentIcons.CaretLeftSolid8
|
||||
onClicked: {
|
||||
control.decrease()
|
||||
}
|
||||
}
|
||||
FluIconButton{
|
||||
width: 10
|
||||
height: 10
|
||||
iconSize: 6
|
||||
verticalPadding: 0
|
||||
horizontalPadding: 0
|
||||
iconColor: control.color
|
||||
opacity: back_rect.opacity
|
||||
anchors{
|
||||
right: parent.right
|
||||
rightMargin: 4
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
visible: control.horizontal
|
||||
iconSource: FluentIcons.CaretRightSolid8
|
||||
onClicked: {
|
||||
control.increase()
|
||||
}
|
||||
}
|
||||
FluIconButton{
|
||||
width: 10
|
||||
height: 10
|
||||
iconSize: 6
|
||||
verticalPadding: 0
|
||||
horizontalPadding: 0
|
||||
iconColor: control.color
|
||||
opacity: back_rect.opacity
|
||||
anchors{
|
||||
top: parent.top
|
||||
topMargin: 4
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
visible: control.vertical
|
||||
iconSource: FluentIcons.CaretUpSolid8
|
||||
onClicked: {
|
||||
control.decrease()
|
||||
}
|
||||
}
|
||||
FluIconButton{
|
||||
width: 10
|
||||
height: 10
|
||||
iconSize: 6
|
||||
verticalPadding: 0
|
||||
horizontalPadding: 0
|
||||
iconColor: control.color
|
||||
opacity: back_rect.opacity
|
||||
anchors{
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 4
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
visible: control.vertical
|
||||
iconSource: FluentIcons.CaretDownSolid8
|
||||
onClicked: {
|
||||
control.increase()
|
||||
}
|
||||
}
|
||||
contentItem: Item {
|
||||
property bool collapsed: (control.policy === T.ScrollBar.AlwaysOn || (control.active && control.size < 1.0))
|
||||
implicitWidth: control.interactive ? 6 : 2
|
||||
implicitHeight: control.interactive ? 6 : 2
|
||||
|
||||
implicitWidth: control.interactive ? d.maxLine : d.minLine
|
||||
implicitHeight: control.interactive ? d.maxLine : d.minLine
|
||||
Rectangle{
|
||||
id:rect_bar
|
||||
width: vertical ? 2 : parent.width
|
||||
height: horizontal ? 2 : parent.height
|
||||
width: vertical ? d.minLine : parent.width
|
||||
height: horizontal ? d.minLine : parent.height
|
||||
color:{
|
||||
if(control.pressed){
|
||||
return control.pressedColor
|
||||
@ -45,8 +142,8 @@ T.ScrollBar {
|
||||
when: contentItem.collapsed
|
||||
PropertyChanges {
|
||||
target: rect_bar
|
||||
width: vertical ? 6 : parent.width
|
||||
height: horizontal ? 6 : parent.height
|
||||
width: vertical ? d.maxLine : parent.width
|
||||
height: horizontal ? d.maxLine : parent.height
|
||||
}
|
||||
}
|
||||
,State{
|
||||
@ -54,8 +151,8 @@ T.ScrollBar {
|
||||
when: !contentItem.collapsed
|
||||
PropertyChanges {
|
||||
target: rect_bar
|
||||
width: vertical ? 2 : parent.width
|
||||
height: horizontal ? 2 : parent.height
|
||||
width: vertical ? d.minLine : parent.width
|
||||
height: horizontal ? d.minLine : parent.height
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -74,6 +171,8 @@ T.ScrollBar {
|
||||
}
|
||||
,Transition {
|
||||
to: "show"
|
||||
SequentialAnimation {
|
||||
PauseAnimation { duration: 450 }
|
||||
NumberAnimation {
|
||||
target: rect_bar
|
||||
properties: vertical ? "width" : "height"
|
||||
@ -81,6 +180,7 @@ T.ScrollBar {
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ FluMenu{
|
||||
text:cutText
|
||||
focus: false
|
||||
padding: 0
|
||||
height: visible ? 34 : 0
|
||||
height: visible ? 36 : 0
|
||||
visible: inputItem.selectedText !== "" && !inputItem.readOnly
|
||||
onClicked: {
|
||||
inputItem.cut()
|
||||
@ -43,7 +43,7 @@ FluMenu{
|
||||
text:copyText
|
||||
focus: false
|
||||
padding: 0
|
||||
height: visible ? 34 : 0
|
||||
height: visible ? 36 : 0
|
||||
visible: inputItem.selectedText !== ""
|
||||
onClicked: {
|
||||
inputItem.copy()
|
||||
@ -55,8 +55,7 @@ FluMenu{
|
||||
text:pasteText
|
||||
focus: false
|
||||
padding: 0
|
||||
height: visible ? 34 : 0
|
||||
visible: inputItem.canPaste
|
||||
height: visible ? 36 : 0
|
||||
onClicked: {
|
||||
inputItem.paste()
|
||||
menu.close()
|
||||
@ -67,7 +66,7 @@ FluMenu{
|
||||
text:selectAllText
|
||||
focus: false
|
||||
padding: 0
|
||||
height: visible ? 34 : 0
|
||||
height: visible ? 36 : 0
|
||||
visible: inputItem.text !== ""
|
||||
onClicked: {
|
||||
inputItem.selectAll()
|
||||
|
Loading…
Reference in New Issue
Block a user