Доделал делегат
This commit is contained in:
@@ -20,8 +20,18 @@ Item {
|
|||||||
radius: 5
|
radius: 5
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: root.title
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
text: root.title
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.margins: 5
|
||||||
|
width: height
|
||||||
|
|
||||||
|
source: "Off.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,9 +49,28 @@ Item {
|
|||||||
width: root.width
|
width: root.width
|
||||||
|
|
||||||
GradientButton {
|
GradientButton {
|
||||||
|
id: button
|
||||||
|
|
||||||
width: (root.width - buttonsRow.spacing * (root.lights.count - 1)) / root.lights.count
|
width: (root.width - buttonsRow.spacing * (root.lights.count - 1)) / root.lights.count
|
||||||
height: width / 2
|
height: width / 2
|
||||||
radius: 5
|
radius: 5
|
||||||
|
|
||||||
|
Column {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
|
||||||
|
Image {
|
||||||
|
height: button.height * 0.5
|
||||||
|
width: height
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
source: "lamp.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
horizontalAlignment: Text.horizontalCenter
|
||||||
|
text: name
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user