1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-05-20 04:42:41 +00:00
harbour-sailfin/qml/components/RemoteImage.qml

30 lines
712 B
QML
Raw Normal View History

import QtQuick 2.6
import Sailfish.Silica 1.0
Image {
property string fallbackImage
property bool usingFallbackImage
BusyIndicator {
anchors.centerIn: parent
running: parent.status == Image.Loading
}
Rectangle {
id: fallbackBackground
anchors.fill: parent
gradient: Gradient {
GradientStop { position: 0.0; color: Theme.highlightColor; }
GradientStop { position: 1.0; color: Theme.highlightDimmerColor; }
}
visible: parent.status == Image.Error
}
Image {
id: fallbackImageItem
anchors.centerIn: parent
visible: parent.status == Image.Error
source: fallbackImage ? fallbackImage : "image://theme/icon-m-question"
}
}