Security.qml: fix first DeviceSection padding

This commit is contained in:
miruka
2020-11-04 09:28:45 -04:00
parent df979ec5fa
commit c7d4f719b6
3 changed files with 11 additions and 11 deletions

View File

@@ -23,7 +23,7 @@ CheckBox {
indicator: Rectangle {
opacity: box.enabled ? 1 : theme.disabledElementsOpacity + 0.2
implicitWidth: theme.controls.checkBox.boxSize
implicitWidth: 24
implicitHeight: implicitWidth
x: box.leftPadding
y: box.topPadding + box.availableHeight / 2 - height / 2
@@ -41,6 +41,10 @@ CheckBox {
Behavior on border.color { HColorAnimation { factor: 0.5 } }
// FIXME: workaround for sizing bug in Security.qml ListView sections
Component.onCompleted:
implicitWidth = Qt.binding(() => theme.controls.checkBox.boxSize)
HIcon {
anchors.centerIn: parent
dimension: parent.width - 2

View File

@@ -238,6 +238,12 @@ HColumnPage {
}
}
section.property: "type"
section.delegate: DeviceSection {
width: deviceList.width
view: deviceList
}
delegate: DeviceDelegate {
width: deviceList.width
view: deviceList
@@ -249,12 +255,6 @@ HColumnPage {
onDeleteRequest: page.deleteDevices(model.index)
}
section.property: "type"
section.delegate: DeviceSection {
width: deviceList.width
view: deviceList
}
Component.onCompleted: page.loadDevices()
Layout.fillWidth: true