Добавил кнопку с градиентом
This commit is contained in:
@@ -5,17 +5,45 @@ Item {
|
||||
id: root
|
||||
|
||||
property string title: ""
|
||||
property var lights: []
|
||||
property QtObject lights: undefined
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: 20
|
||||
Column {
|
||||
width: root.width
|
||||
|
||||
color: "green"
|
||||
spacing: 5
|
||||
|
||||
Label {
|
||||
text: root.title
|
||||
anchors.centerIn: parent
|
||||
GradientButton {
|
||||
width: root.width
|
||||
height: 40
|
||||
|
||||
visible: Boolean(root.title)
|
||||
radius: 5
|
||||
|
||||
Label {
|
||||
text: root.title
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
id: buttonsRow
|
||||
|
||||
width: root.width
|
||||
height: childrenRect.height
|
||||
|
||||
spacing: 5
|
||||
|
||||
Repeater {
|
||||
model: root.lights
|
||||
|
||||
width: root.width
|
||||
|
||||
GradientButton {
|
||||
width: (root.width - buttonsRow.spacing * (root.lights.count - 1)) / root.lights.count
|
||||
height: width / 2
|
||||
radius: 5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user