Commit f5c3c72a authored by Noah Davis's avatar Noah Davis 🌵
Browse files

ImageViewer: Move BusyIndicator to ListView

parent 27d43010
......@@ -717,6 +717,44 @@ Kirigami.Page {
}
}
}
Controls.BusyIndicator {
id: busyIndicator
property Item target: listView.currentItem
anchors.centerIn: parent
parent: listView
visible: running
z: 1
running: target && target.loading
background: Rectangle {
radius: height/2
color: busyIndicator.palette.base
}
SequentialAnimation {
running: busyIndicator.visible
PropertyAction {
target: busyIndicator
property: "opacity"
value: 0
}
// Don't show if the waiting time is pretty short.
// If we had some way to predict how long it might take,
// it would be better to use that to decide whether or not
// to show the BusyIndicator.
PauseAnimation {
duration: 200
}
NumberAnimation {
target: busyIndicator
property: "opacity"
from: 0
to: 1
duration: Kirigami.Units.veryLongDuration
easing.type: Easing.OutCubic
}
}
}
}
}
Component {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment