on xenial help sign in
make MoviePreview use the LazyImage too
5bc8421Michael Zanetti
Dash/Movie/MoviePreview.qml+4−10
@@ -32,19 +32,13 @@ GenericPreview {
32
32
33 Component {
33 Component {
34 id: previewImageComponent
34 id: previewImageComponent
35− UbuntuShape {
35+ LazyImage {
36− id: urlLoader
37 anchors.left: parent.left
36 anchors.left: parent.left
38 anchors.right: parent.right
37 anchors.right: parent.right
39− height: previewImage.sourceSize.width != 0 ? width * previewImage.sourceSize.height / previewImage.sourceSize.width : 0
38+ scaleTo: "width"
40− radius: "medium"
41 visible: height > 0
39 visible: height > 0
42− image: Image {
43− id: previewImage
44− asynchronous: true
45− source: root.url
40+ source: root.url
46− fillMode: Image.PreserveAspectCrop
41+ height: implicitHeight
47− }
48
42
49 Image {
43 Image {
50 objectName: "playButton"
44 objectName: "playButton"
tests/qmltests/Dash/Movie/tst_MoviePreview.qml+1−1
@@ -49,7 +49,7 @@ Item {
49 property string title: "Unity Movie"
49 property string title: "Unity Movie"
50 property string subtitle: "Subtitle"
50 property string subtitle: "Subtitle"
51 property string description: "This is the description"
51 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"
53 property var actions: get_actions_data()
53 property var actions: get_actions_data()
54 property string year: "2013"
54 property string year: "2013"
55 property real rating: 0.3
55 property real rating: 0.3