Merge PR #259: Fix spacing of shutter controls
This commit is contained in:
commit
762a08528b
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,6 +82,7 @@ Item {
|
||||
ShutterControls {
|
||||
id: controls
|
||||
device: garageGateView.device
|
||||
spacing: (parent.width - app.iconSize*2*children.length) / (children.length - 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user