This commit is contained in:
朱子楚\zhuzi
2023-02-26 23:47:07 +08:00
parent 312418aded
commit 31d563d2f6
51 changed files with 2649 additions and 166 deletions

View File

@ -0,0 +1,30 @@
import QtQuick 2.0
import QtQuick.Controls 2.0
Switch {
id: root
property color checkedColor: "#0064B0"
indicator: Rectangle {
width: 40
height: 20
radius: height / 2
color: root.checked ? checkedColor : "white"
border.width: 1
border.color: root.checked ? checkedColor : "#666666"
Rectangle {
x: root.checked ? parent.width - width - 4 : 4
width: root.checked ? parent.height - 8 : parent.height - 8
height: width
radius: width / 2
anchors.verticalCenter: parent.verticalCenter
color: root.checked ? "#FFFFFF" : "#666666"
// border.color: "#D5D5D5"
Behavior on x {
NumberAnimation { duration: 200 }
}
}
}
}