Show broken image icon when image fails to load

This commit is contained in:
miruka
2019-11-06 16:09:07 -04:00
parent 8383b6d3e4
commit 3acd3ba66a
3 changed files with 15 additions and 8 deletions

View File

@@ -75,4 +75,12 @@ Image {
Behavior on value { HNumberAnimation { factor: 2 } }
}
HIcon {
anchors.centerIn: parent
visible: image.status === Image.Error
svgName: "broken-image"
dimension: Math.max(16, Math.min(parent.width, parent.height) * 0.2)
colorize: theme.colors.negativeBackground
}
}