main
zhuzihcu 2023-03-09 16:44:24 +08:00
parent bdf4da81dd
commit e2cefb6114
8 changed files with 58 additions and 32 deletions

View File

@ -34,7 +34,7 @@ FluWindow {
fontStyle: FluText.Title
}
FluText{
text:"v1.0.1"
text:"v1.0.2"
fontStyle: FluText.Body
Layout.alignment: Qt.AlignBottom
}

View File

@ -91,7 +91,7 @@ FluWindow {
FluMenuItem{
text:"意见反馈"
onClicked:{
showInfo("正在建设中...")
Qt.openUrlExternally("https://github.com/zhuzichu520/FluentUI/issues/new")
}
}
FluMenuItem{

View File

@ -26,6 +26,12 @@ Item {
Layout.leftMargin: 15
value: 50
}
FluSlider{
orientation:FluSlider.Vertical
Layout.topMargin: 20
Layout.leftMargin: 15
value: 50
}
}
}
}

View File

@ -7,8 +7,8 @@ Rectangle {
property string text: "Standard Button"
property int startPadding : 15
property int endPadding : 15
property int topPadding: 8
property int bottomPadding: 8
property int topPadding: 5
property int bottomPadding: 5
property bool disabled: false
property color primaryColor : "#0064B0"
signal clicked

View File

@ -8,8 +8,8 @@ Rectangle {
property string text: "Filled Button"
property int startPadding : 15
property int endPadding : 15
property int topPadding: 8
property int bottomPadding: 8
property int topPadding: 5
property int bottomPadding: 5
property bool disabled: false
signal clicked

View File

@ -4,8 +4,8 @@ import QtQuick.Controls 2.12
FluRectangle {
id: control
width: 180
height: 6
width: 150
height: 5
radius: [3,3,3,3]
clip: true
color: FluTheme.isDark ? Qt.rgba(41/255,41/255,41/255,1) : Qt.rgba(214/255,214/255,214/255,1)

View File

@ -4,13 +4,13 @@ import QtQuick.Controls 2.12
Rectangle {
id: control
width: 60
height: 60
radius: 30
width: 44
height: 44
radius: 22
border.width: linWidth
color: "#00000000"
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 bool indeterminate: true
readonly property real radius2 : radius - linWidth/2

View File

@ -6,23 +6,40 @@ Item{
id:root
property int lineWidth: 6
property int dotSize: 30
property int lineWidth: 5
property int dotSize: 26
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: {
if(isHorizontal){
dot.x =value/100*control.width - dotSize/2
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 {
id: control
width: 300
height: root.lineWidth
width: isHorizontal ? 200 : root.lineWidth
height: isHorizontal ? root.lineWidth : 200
radius: [3,3,3,3]
clip: true
anchors.verticalCenter: parent.verticalCenter
@ -30,8 +47,8 @@ Item{
Rectangle{
id:rect
radius: 3
width: control.width*(value/100)
height: control.height
width: isHorizontal ? control.width*(value/100) : control.width
height: isHorizontal ? control.height : control.height*(value/100)
color:FluTheme.isDark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark
}
}
@ -41,10 +58,11 @@ Item{
width: dotSize
height: dotSize
FluShadow{
radius: 15
radius: dotSize/2
}
radius: 15
anchors.verticalCenter: parent.verticalCenter
radius: dotSize/2
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)
Rectangle{
width: dotSize/2
@ -65,9 +83,11 @@ Item{
hoverEnabled: true
drag {
target: dot
axis: Drag.XAxis
minimumX: -dotSize/2
maximumX: control.width - dotSize/2
axis: isHorizontal ? Drag.XAxis : Drag.YAxis
minimumX: isHorizontal ? -dotSize/2 : 0
maximumX: isHorizontal ? (control.width - dotSize/2) : 0
minimumY: isHorizontal ? 0 : -dotSize/2
maximumY: isHorizontal ? 0 : (control.height - dotSize/2)
}
onPressed: {
tool_tip.visible = true