Use refreshButton.loading, not separate spinner
This commit is contained in:
parent
38da930a99
commit
0d8d07e352
|
@ -99,10 +99,7 @@ HColumnPage {
|
|||
|
||||
contentHeight: Math.min(
|
||||
window.height,
|
||||
Math.max(
|
||||
deviceList.contentHeight + deviceList.bottomMargin,
|
||||
busyIndicatorLoader.height + theme.spacing * 2,
|
||||
)
|
||||
deviceList.contentHeight + deviceList.bottomMargin,
|
||||
)
|
||||
|
||||
Keys.forwardTo: [deviceList]
|
||||
|
@ -215,6 +212,7 @@ HColumnPage {
|
|||
GroupButton {
|
||||
id: refreshButton
|
||||
text: qsTr("Refresh")
|
||||
loading: page.loadFuture !== null
|
||||
icon.name: "device-refresh-list"
|
||||
onClicked: page.loadDevices()
|
||||
}
|
||||
|
@ -318,18 +316,5 @@ HColumnPage {
|
|||
active:
|
||||
! 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