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