fix(Devices): fix devices list not showing

This commit is contained in:
Jonathan Rainville 2022-05-11 15:29:33 -04:00 committed by Iuri Matias
parent 03d7632f32
commit 88f923fe53
1 changed files with 31 additions and 30 deletions

View File

@ -23,7 +23,7 @@ SettingsContentBase {
Item {
width: root.contentWidth
height: this.childrenRect.height
height: parent.height
Item {
id: firstTimeSetup
@ -142,17 +142,15 @@ SettingsContentBase {
}
}
Item {
id: deviceListItem
anchors.left: root.left
anchors.left: parent.left
anchors.leftMargin: Style.current.padding
anchors.top: advertiseDeviceItem.visible ? advertiseDeviceItem.bottom : parent.top
anchors.topMargin: Style.current.padding * 2
anchors.bottom: syncAllBtn.top
anchors.bottomMargin: Style.current.padding
anchors.right: root.right
anchors.right: parent.right
anchors.rightMargin: Style.current.padding
height: childrenRect.height
visible: root.devicesStore.isDeviceSetup
StatusBaseText {
@ -166,24 +164,24 @@ SettingsContentBase {
ListView {
id: listView
anchors.bottom: parent.bottom
anchors.top: deviceListLbl.bottom
anchors.topMargin: Style.current.padding
// This is a placeholder fix to the display. This whole page will be redesigned
height: 300
spacing: 5
anchors.right: parent.right
anchors.left: parent.left
width: parent.width
// TODO: replace with StatusQ component
delegate: Item {
height: childrenRect.height
SVGImage {
id: enabledIcon
source: Style.svg(devicePairedSwitch.checked ? "messageActive" : "message")
source: Style.svg("messageActive")
height: 24
width: 24
ColorOverlay {
anchors.fill: parent
source: parent
color: Style.current.blue
color: devicePairedSwitch.checked ? Style.current.blue : Style.current.darkGrey
}
}
StatusBaseText {
@ -214,13 +212,15 @@ SettingsContentBase {
}
model: root.devicesStore.devicesModel
}
}
StatusButton {
id: syncAllBtn
anchors.bottom: parent.bottom
anchors.bottomMargin: Style.current.padding
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: listView.bottom
anchors.topMargin: Style.current.padding
// anchors.bottom: parent.bottom
// anchors.bottomMargin: Style.current.padding
anchors.horizontalCenter: listView.horizontalCenter
text: isSyncing ?
//% "Syncing..."
qsTrId("sync-in-progress") :
@ -236,6 +236,7 @@ SettingsContentBase {
}, 10000);
}
}
}
Timer {
id: timer