make MoviePreview use the LazyImage too
commit5bc84210525bc93093b3b92ed1b26f6893514410
authorMichael Zanetti <michael.zanetti@canonical.com>
dateWed 2 Oct 2013, 16:42 (13 years ago)
parent635077d
Dash/Movie/MoviePreview.qml+4−10
@@ -32,19 +32,13 @@ GenericPreview {
3232
3333 Component {
3434 id: previewImageComponent
35− UbuntuShape {
36− id: urlLoader
35+ LazyImage {
3736 anchors.left: parent.left
3837 anchors.right: parent.right
39− height: previewImage.sourceSize.width != 0 ? width * previewImage.sourceSize.height / previewImage.sourceSize.width : 0
40− radius: "medium"
38+ scaleTo: "width"
4139 visible: height > 0
42− image: Image {
43− id: previewImage
44− asynchronous: true
45− source: root.url
46− fillMode: Image.PreserveAspectCrop
47− }
40+ source: root.url
41+ height: implicitHeight
4842
4943 Image {
5044 objectName: "playButton"
tests/qmltests/Dash/Movie/tst_MoviePreview.qml+1−1
@@ -49,7 +49,7 @@ Item {
4949 property string title: "Unity Movie"
5050 property string subtitle: "Subtitle"
5151 property string description: "This is the description"
52− property string image: "image://theme/syncing"
52+ property string image: "../../tests/qmltests/Components/tst_LazyImage/square.png"
5353 property var actions: get_actions_data()
5454 property string year: "2013"
5555 property real rating: 0.3