added page transition effects

- added functionality for buttons on PageSettingsServerData page
This commit is contained in:
vladimir.kuznetsov 2023-06-01 11:25:33 +08:00
parent 1e180489a4
commit de0cd976de
38 changed files with 656 additions and 335 deletions

View file

@ -7,7 +7,7 @@ import ConnectionState 1.0
Button {
id: root
text: "Подключиться"
text: qsTr("Connect")
background: Image {
id: border
@ -60,37 +60,37 @@ Button {
case ConnectionState.Disconnected: {
console.log("Disconnected")
connectionProccess.running = false
root.text = "Подключиться"
root.text = qsTr("Connect")
break
}
case ConnectionState.Preparing: {
console.log("Preparing")
connectionProccess.running = true
root.text = "Подключение..."
root.text = qsTr("Connection...")
break
}
case ConnectionState.Connecting: {
console.log("Connecting")
connectionProccess.running = true
root.text = "Подключение..."
root.text = qsTr("Connection...")
break
}
case ConnectionState.Connected: {
console.log("Connected")
connectionProccess.running = false
root.text = "Подключено"
root.text = qsTr("Connected")
break
}
case ConnectionState.Disconnecting: {
console.log("Disconnecting")
connectionProccess.running = true
root.text = "Отключение..."
root.text = qsTr("Disconnection...")
break
}
case ConnectionState.Reconnecting: {
console.log("Reconnecting")
connectionProccess.running = true
root.text = "Переподключение..."
root.text = qsTr("Reconnection...")
break
}
case ConnectionState.Error: {

View file

@ -8,16 +8,12 @@ import "../Controls2"
import "../Controls2/TextTypes"
import "../Config"
Drawer {
DrawerType {
id: root
edge: Qt.BottomEdge
width: parent.width
height: parent.height * 0.4375
clip: true
modal: true
background: Rectangle {
anchors.fill: parent
anchors.bottomMargin: -radius

View file

@ -29,64 +29,23 @@ ListView {
implicitWidth: rootWidth
implicitHeight: containerRadioButton.implicitHeight
RadioButton {
VerticalRadioButton {
id: containerRadioButton
implicitWidth: parent.width
implicitHeight: containerRadioButtonContent.implicitHeight
anchors.fill: parent
anchors.rightMargin: 16
anchors.leftMargin: 16
hoverEnabled: true
text: name
descriptionText: description
ButtonGroup.group: containersRadioButtonGroup
checked: isDefault
indicator: Rectangle {
anchors.fill: parent
color: containerRadioButton.hovered ? "#2C2D30" : "#1C1D21"
Behavior on color {
PropertyAnimation { duration: 200 }
}
}
imageSource: "qrc:/images/controls/download.svg"
showImage: !isInstalled
checkable: isInstalled
RowLayout {
id: containerRadioButtonContent
anchors.fill: parent
anchors.rightMargin: 16
anchors.leftMargin: 16
z: 1
Image {
source: isInstalled ? "qrc:/images/controls/check.svg" : "qrc:/images/controls/download.svg"
visible: isInstalled ? containerRadioButton.checked : true
width: 24
height: 24
Layout.rightMargin: 8
}
Text {
id: containerRadioButtonText
text: name
color: "#D7D8DB"
font.pixelSize: 16
font.weight: 400
font.family: "PT Root UI VF"
height: 24
Layout.fillWidth: true
Layout.topMargin: 20
Layout.bottomMargin: 20
}
}
checked: isDefault
onClicked: {
if (checked) {

View file

@ -14,6 +14,7 @@ import "../Controls2/TextTypes"
ListView {
id: root
width: parent.width
height: root.contentItem.height
clip: true
@ -23,7 +24,7 @@ ListView {
}
delegate: Item {
implicitWidth: parent.width
implicitWidth: root.width
implicitHeight: containerRadioButton.implicitHeight
RadioButton {