Merge PR #259: Fix spacing of shutter controls
This commit is contained in:
commit
762a08528b
@ -6,8 +6,6 @@ import Nymea 1.0
|
|||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: root
|
id: root
|
||||||
spacing: (parent.width - app.iconSize*2*children.length) / (children.length - 1)
|
|
||||||
// implicitWidth: app.iconSize * 2 * children.length + spacing * (children.length - 1)
|
|
||||||
implicitWidth: childrenRect.width
|
implicitWidth: childrenRect.width
|
||||||
|
|
||||||
property var device: null
|
property var device: null
|
||||||
|
|||||||
@ -123,6 +123,7 @@ DeviceListPageBase {
|
|||||||
Item {
|
Item {
|
||||||
Layout.preferredWidth: shutterControls.implicitWidth
|
Layout.preferredWidth: shutterControls.implicitWidth
|
||||||
Layout.preferredHeight: app.iconSize * 2
|
Layout.preferredHeight: app.iconSize * 2
|
||||||
|
Rectangle { anchors.fill: parent; color: "green"; opacity: .3 }
|
||||||
ShutterControls {
|
ShutterControls {
|
||||||
id: shutterControls
|
id: shutterControls
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|||||||
@ -74,6 +74,7 @@ DevicePageBase {
|
|||||||
device: root.device
|
device: root.device
|
||||||
invert: true
|
invert: true
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
spacing: (parent.width - app.iconSize*2*children.length) / (children.length - 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -84,6 +84,7 @@ DevicePageBase {
|
|||||||
id: shutterControls
|
id: shutterControls
|
||||||
device: root.device
|
device: root.device
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
spacing: (parent.width - app.iconSize*2*children.length) / (children.length - 1)
|
||||||
|
|
||||||
ItemDelegate {
|
ItemDelegate {
|
||||||
Layout.preferredWidth: app.iconSize * 2
|
Layout.preferredWidth: app.iconSize * 2
|
||||||
|
|||||||
@ -72,6 +72,7 @@ DevicePageBase {
|
|||||||
id: shutterControls
|
id: shutterControls
|
||||||
device: root.device
|
device: root.device
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
spacing: (parent.width - app.iconSize*2*children.length) / (children.length - 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,6 +82,7 @@ Item {
|
|||||||
ShutterControls {
|
ShutterControls {
|
||||||
id: controls
|
id: controls
|
||||||
device: garageGateView.device
|
device: garageGateView.device
|
||||||
|
spacing: (parent.width - app.iconSize*2*children.length) / (children.length - 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user