Use refreshButton.loading, not separate spinner
This commit is contained in:
parent
38da930a99
commit
0d8d07e352
|
@ -99,10 +99,7 @@ HColumnPage {
|
||||||
|
|
||||||
contentHeight: Math.min(
|
contentHeight: Math.min(
|
||||||
window.height,
|
window.height,
|
||||||
Math.max(
|
deviceList.contentHeight + deviceList.bottomMargin,
|
||||||
deviceList.contentHeight + deviceList.bottomMargin,
|
|
||||||
busyIndicatorLoader.height + theme.spacing * 2,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Keys.forwardTo: [deviceList]
|
Keys.forwardTo: [deviceList]
|
||||||
|
@ -215,6 +212,7 @@ HColumnPage {
|
||||||
GroupButton {
|
GroupButton {
|
||||||
id: refreshButton
|
id: refreshButton
|
||||||
text: qsTr("Refresh")
|
text: qsTr("Refresh")
|
||||||
|
loading: page.loadFuture !== null
|
||||||
icon.name: "device-refresh-list"
|
icon.name: "device-refresh-list"
|
||||||
onClicked: page.loadDevices()
|
onClicked: page.loadDevices()
|
||||||
}
|
}
|
||||||
|
@ -318,18 +316,5 @@ HColumnPage {
|
||||||
active:
|
active:
|
||||||
! mainUI.debugConsole.visible && page.enableFlickShortcuts
|
! mainUI.debugConsole.visible && page.enableFlickShortcuts
|
||||||
}
|
}
|
||||||
|
|
||||||
HLoader {
|
|
||||||
id: busyIndicatorLoader
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: 96 * theme.uiScale
|
|
||||||
height: width
|
|
||||||
|
|
||||||
source: "../../Base/HBusyIndicator.qml"
|
|
||||||
active: page.loadFuture
|
|
||||||
opacity: active ? 1 : 0
|
|
||||||
|
|
||||||
Behavior on opacity { HNumberAnimation { factor: 2 } }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user