Merge PR #259: Fix spacing of shutter controls

This commit is contained in:
Jenkins nymea 2019-10-28 17:20:57 +01:00
commit 762a08528b
6 changed files with 5 additions and 2 deletions

View File

@ -6,8 +6,6 @@ import Nymea 1.0
RowLayout {
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
property var device: null

View File

@ -123,6 +123,7 @@ DeviceListPageBase {
Item {
Layout.preferredWidth: shutterControls.implicitWidth
Layout.preferredHeight: app.iconSize * 2
Rectangle { anchors.fill: parent; color: "green"; opacity: .3 }
ShutterControls {
id: shutterControls
height: parent.height

View File

@ -74,6 +74,7 @@ DevicePageBase {
device: root.device
invert: true
anchors.horizontalCenter: parent.horizontalCenter
spacing: (parent.width - app.iconSize*2*children.length) / (children.length - 1)
}
}

View File

@ -84,6 +84,7 @@ DevicePageBase {
id: shutterControls
device: root.device
anchors.centerIn: parent
spacing: (parent.width - app.iconSize*2*children.length) / (children.length - 1)
ItemDelegate {
Layout.preferredWidth: app.iconSize * 2

View File

@ -72,6 +72,7 @@ DevicePageBase {
id: shutterControls
device: root.device
anchors.horizontalCenter: parent.horizontalCenter
spacing: (parent.width - app.iconSize*2*children.length) / (children.length - 1)
}
}
}

View File

@ -82,6 +82,7 @@ Item {
ShutterControls {
id: controls
device: garageGateView.device
spacing: (parent.width - app.iconSize*2*children.length) / (children.length - 1)
}
}
}