mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 11:17:15 +08:00
update
This commit is contained in:
parent
bdf4da81dd
commit
e2cefb6114
@ -34,7 +34,7 @@ FluWindow {
|
|||||||
fontStyle: FluText.Title
|
fontStyle: FluText.Title
|
||||||
}
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text:"v1.0.1"
|
text:"v1.0.2"
|
||||||
fontStyle: FluText.Body
|
fontStyle: FluText.Body
|
||||||
Layout.alignment: Qt.AlignBottom
|
Layout.alignment: Qt.AlignBottom
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ FluWindow {
|
|||||||
FluMenuItem{
|
FluMenuItem{
|
||||||
text:"意见反馈"
|
text:"意见反馈"
|
||||||
onClicked:{
|
onClicked:{
|
||||||
showInfo("正在建设中...")
|
Qt.openUrlExternally("https://github.com/zhuzichu520/FluentUI/issues/new")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluMenuItem{
|
FluMenuItem{
|
||||||
|
@ -26,6 +26,12 @@ Item {
|
|||||||
Layout.leftMargin: 15
|
Layout.leftMargin: 15
|
||||||
value: 50
|
value: 50
|
||||||
}
|
}
|
||||||
|
FluSlider{
|
||||||
|
orientation:FluSlider.Vertical
|
||||||
|
Layout.topMargin: 20
|
||||||
|
Layout.leftMargin: 15
|
||||||
|
value: 50
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,8 @@ Rectangle {
|
|||||||
property string text: "Standard Button"
|
property string text: "Standard Button"
|
||||||
property int startPadding : 15
|
property int startPadding : 15
|
||||||
property int endPadding : 15
|
property int endPadding : 15
|
||||||
property int topPadding: 8
|
property int topPadding: 5
|
||||||
property int bottomPadding: 8
|
property int bottomPadding: 5
|
||||||
property bool disabled: false
|
property bool disabled: false
|
||||||
property color primaryColor : "#0064B0"
|
property color primaryColor : "#0064B0"
|
||||||
signal clicked
|
signal clicked
|
||||||
|
@ -8,8 +8,8 @@ Rectangle {
|
|||||||
property string text: "Filled Button"
|
property string text: "Filled Button"
|
||||||
property int startPadding : 15
|
property int startPadding : 15
|
||||||
property int endPadding : 15
|
property int endPadding : 15
|
||||||
property int topPadding: 8
|
property int topPadding: 5
|
||||||
property int bottomPadding: 8
|
property int bottomPadding: 5
|
||||||
property bool disabled: false
|
property bool disabled: false
|
||||||
|
|
||||||
signal clicked
|
signal clicked
|
||||||
|
@ -4,8 +4,8 @@ import QtQuick.Controls 2.12
|
|||||||
FluRectangle {
|
FluRectangle {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
width: 180
|
width: 150
|
||||||
height: 6
|
height: 5
|
||||||
radius: [3,3,3,3]
|
radius: [3,3,3,3]
|
||||||
clip: true
|
clip: true
|
||||||
color: FluTheme.isDark ? Qt.rgba(41/255,41/255,41/255,1) : Qt.rgba(214/255,214/255,214/255,1)
|
color: FluTheme.isDark ? Qt.rgba(41/255,41/255,41/255,1) : Qt.rgba(214/255,214/255,214/255,1)
|
||||||
|
@ -4,13 +4,13 @@ import QtQuick.Controls 2.12
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
width: 60
|
width: 44
|
||||||
height: 60
|
height: 44
|
||||||
radius: 30
|
radius: 22
|
||||||
border.width: linWidth
|
border.width: linWidth
|
||||||
color: "#00000000"
|
color: "#00000000"
|
||||||
border.color: FluTheme.isDark ? Qt.rgba(41/255,41/255,41/255,1) : Qt.rgba(214/255,214/255,214/255,1)
|
border.color: FluTheme.isDark ? Qt.rgba(41/255,41/255,41/255,1) : Qt.rgba(214/255,214/255,214/255,1)
|
||||||
property real linWidth : 6
|
property real linWidth : 5
|
||||||
property real progress: 0.25
|
property real progress: 0.25
|
||||||
property bool indeterminate: true
|
property bool indeterminate: true
|
||||||
readonly property real radius2 : radius - linWidth/2
|
readonly property real radius2 : radius - linWidth/2
|
||||||
|
@ -6,23 +6,40 @@ Item{
|
|||||||
|
|
||||||
id:root
|
id:root
|
||||||
|
|
||||||
property int lineWidth: 6
|
property int lineWidth: 5
|
||||||
property int dotSize: 30
|
property int dotSize: 26
|
||||||
property int value: 50
|
property int value: 50
|
||||||
|
|
||||||
|
enum Orientation {
|
||||||
|
Horizontal,
|
||||||
|
Vertical
|
||||||
|
}
|
||||||
|
|
||||||
|
height: control.height
|
||||||
|
width: control.width
|
||||||
|
|
||||||
|
property int orientation: FluSlider.Horizontal
|
||||||
|
|
||||||
|
property bool isHorizontal: orientation === FluSlider.Horizontal
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
if(isHorizontal){
|
||||||
dot.x =value/100*control.width - dotSize/2
|
dot.x =value/100*control.width - dotSize/2
|
||||||
root.value = Qt.binding(function(){
|
root.value = Qt.binding(function(){
|
||||||
return (dot.x+15)/control.width*100
|
return (dot.x+dotSize/2)/control.width*100
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
dot.y =value/100*control.height - dotSize/2
|
||||||
|
root.value = Qt.binding(function(){
|
||||||
|
return (dot.y+dotSize/2)/control.height*100
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FluRectangle {
|
FluRectangle {
|
||||||
|
|
||||||
id: control
|
id: control
|
||||||
|
width: isHorizontal ? 200 : root.lineWidth
|
||||||
width: 300
|
height: isHorizontal ? root.lineWidth : 200
|
||||||
height: root.lineWidth
|
|
||||||
radius: [3,3,3,3]
|
radius: [3,3,3,3]
|
||||||
clip: true
|
clip: true
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@ -30,8 +47,8 @@ Item{
|
|||||||
Rectangle{
|
Rectangle{
|
||||||
id:rect
|
id:rect
|
||||||
radius: 3
|
radius: 3
|
||||||
width: control.width*(value/100)
|
width: isHorizontal ? control.width*(value/100) : control.width
|
||||||
height: control.height
|
height: isHorizontal ? control.height : control.height*(value/100)
|
||||||
color:FluTheme.isDark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark
|
color:FluTheme.isDark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -41,10 +58,11 @@ Item{
|
|||||||
width: dotSize
|
width: dotSize
|
||||||
height: dotSize
|
height: dotSize
|
||||||
FluShadow{
|
FluShadow{
|
||||||
radius: 15
|
radius: dotSize/2
|
||||||
}
|
}
|
||||||
radius: 15
|
radius: dotSize/2
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: isHorizontal ? parent.verticalCenter : undefined
|
||||||
|
anchors.horizontalCenter: isHorizontal ? undefined :parent.horizontalCenter
|
||||||
color:FluTheme.isDark ? Qt.rgba(69/255,69/255,69/255,1) :Qt.rgba(1,1,1,1)
|
color:FluTheme.isDark ? Qt.rgba(69/255,69/255,69/255,1) :Qt.rgba(1,1,1,1)
|
||||||
Rectangle{
|
Rectangle{
|
||||||
width: dotSize/2
|
width: dotSize/2
|
||||||
@ -65,9 +83,11 @@ Item{
|
|||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
drag {
|
drag {
|
||||||
target: dot
|
target: dot
|
||||||
axis: Drag.XAxis
|
axis: isHorizontal ? Drag.XAxis : Drag.YAxis
|
||||||
minimumX: -dotSize/2
|
minimumX: isHorizontal ? -dotSize/2 : 0
|
||||||
maximumX: control.width - dotSize/2
|
maximumX: isHorizontal ? (control.width - dotSize/2) : 0
|
||||||
|
minimumY: isHorizontal ? 0 : -dotSize/2
|
||||||
|
maximumY: isHorizontal ? 0 : (control.height - dotSize/2)
|
||||||
}
|
}
|
||||||
onPressed: {
|
onPressed: {
|
||||||
tool_tip.visible = true
|
tool_tip.visible = true
|
||||||
|
Loading…
Reference in New Issue
Block a user