Merge lp:~artmello/gallery-app/gallery-app-fix_1542083 into lp:gallery-app

Proposed by Arthur Mello
Status: Merged
Approved by: Bill Filler
Approved revision: 1267
Merged at revision: 1276
Proposed branch: lp:~artmello/gallery-app/gallery-app-fix_1542083
Merge into: lp:gallery-app
Diff against target: 517 lines (+159/-111)
5 files modified
po/gallery-app.pot (+78/-104)
rc/qml/AlbumViewer/AlbumInternals/FramePortrait.qml (+17/-0)
rc/qml/Components/MediaGrid.qml (+13/-2)
rc/qml/MediaViewer/SingleMediaViewer.qml (+38/-3)
rc/qml/OrganicView/OrganicMediaList.qml (+13/-2)
To merge this branch: bzr merge lp:~artmello/gallery-app/gallery-app-fix_1542083
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+285705@code.launchpad.net

Commit message

Following some changes on thumbnailer image provider we need to handle Image.Error status for videos that are unable to load correctly

Description of the change

Following some changes on thumbnailer image provider we need to handle Image.Error status for videos that are unable to load correctly

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'po/gallery-app.pot'
--- po/gallery-app.pot 2015-05-21 10:13:59 +0000
+++ po/gallery-app.pot 2016-02-11 11:55:55 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: gallery-app\n"9"Project-Id-Version: gallery-app\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-05-21 13:13+0300\n"11"POT-Creation-Date: 2016-02-11 09:44-0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -23,19 +23,17 @@
23msgstr ""23msgstr ""
2424
25#: rc/qml/AlbumEditor/AlbumEditMenu.qml:5025#: rc/qml/AlbumEditor/AlbumEditMenu.qml:50
26#: rc/qml/AlbumViewer/AlbumViewer.qml:37526#: rc/qml/AlbumViewer/AlbumViewer.qml:378
27#: rc/qml/Components/DeleteDialog.qml:3227#: rc/qml/Components/DeleteDialog.qml:32 rc/qml/EventsOverview.qml:138
28#: rc/qml/MediaViewer/MediaViewer.qml:345 rc/qml/Utility/EditingHUD.qml:6728#: rc/qml/MediaViewer/MediaViewer.qml:354 rc/qml/PhotosOverview.qml:164
29#: rc/qml/Utility/SelectionToolbarAction.qml:5629#: rc/qml/Utility/EditingHUD.qml:67
30msgid "Delete"30msgid "Delete"
31msgstr ""31msgstr ""
3232
33#: rc/qml/AlbumEditor/AlbumEditor.qml:3933#: rc/qml/AlbumEditor/AlbumEditor.qml:39
34#: rc/qml/Components/MediaSelector.qml:9234#: rc/qml/Components/MediaSelector.qml:93 rc/qml/EventsOverview.qml:156
35#: rc/qml/MediaViewer/MediaViewer.qml:27535#: rc/qml/MediaViewer/MediaViewer.qml:282 rc/qml/PhotosOverview.qml:182
36#: rc/qml/MediaViewer/PhotoEditor.qml:20636#: rc/qml/PickerScreen.qml:227
37#: rc/qml/MediaViewer/PhotoEditor/ExposureAdjuster.qml:80
38#: rc/qml/PickerScreen.qml:235 rc/qml/Utility/SelectionToolbarAction.qml:75
39msgid "Cancel"37msgid "Cancel"
40msgstr ""38msgstr ""
4139
@@ -59,43 +57,39 @@
59msgid "Red"57msgid "Red"
60msgstr ""58msgstr ""
6159
62#: rc/qml/AlbumViewer/AlbumViewer.qml:107 rc/qml/MainScreen.qml:6060#: rc/qml/AlbumViewer/AlbumViewer.qml:107 rc/qml/MainScreen.qml:58
63msgid "Album"61msgid "Album"
64msgstr ""62msgstr ""
6563
66#: rc/qml/AlbumViewer/AlbumViewer.qml:36964#: rc/qml/AlbumViewer/AlbumViewer.qml:372
67#: rc/qml/MediaViewer/MediaViewer.qml:33565#: rc/qml/MediaViewer/MediaViewer.qml:344
68msgid "Add to album"66msgid "Add to album"
69msgstr ""67msgstr ""
7068
71#: rc/qml/AlbumsOverview.qml:236 rc/qml/Components/PopupAlbumPicker.qml:9169#: rc/qml/AlbumsOverview.qml:228 rc/qml/Components/PopupAlbumPicker.qml:91
72msgid "Add new album"70msgid "Add new album"
73msgstr ""71msgstr ""
7472
75#: rc/qml/AlbumsOverview.qml:240 rc/qml/Components/PopupAlbumPicker.qml:10173#: rc/qml/AlbumsOverview.qml:232 rc/qml/Components/PopupAlbumPicker.qml:101
76msgid "New Photo Album"74msgid "New Photo Album"
77msgstr ""75msgstr ""
7876
79#: rc/qml/AlbumsOverview.qml:241 rc/qml/Components/PopupAlbumPicker.qml:10277#: rc/qml/AlbumsOverview.qml:233 rc/qml/Components/PopupAlbumPicker.qml:102
80msgid "Subtitle"78msgid "Subtitle"
81msgstr ""79msgstr ""
8280
83#: rc/qml/AlbumsOverview.qml:247 rc/qml/Utility/EditingHUD.qml:7781#: rc/qml/AlbumsOverview.qml:240 rc/qml/EventsOverview.qml:115
84#: rc/qml/Utility/SelectionToolbarAction.qml:4782#: rc/qml/PhotosOverview.qml:141
85msgid "Add"
86msgstr ""
87
88#: rc/qml/AlbumsOverview.qml:252 rc/qml/Utility/PhotosToolbarActions.qml:51
89msgid "Camera"83msgid "Camera"
90msgstr ""84msgstr ""
9185
92#: rc/qml/Components/DeleteDialog.qml:3686#: rc/qml/Components/DeleteDialog.qml:36
93#: rc/qml/MediaViewer/MediaViewer.qml:22387#: rc/qml/MediaViewer/MediaViewer.qml:230
94msgid "Yes"88msgid "Yes"
95msgstr ""89msgstr ""
9690
97#: rc/qml/Components/DeleteDialog.qml:4591#: rc/qml/Components/DeleteDialog.qml:45
98#: rc/qml/MediaViewer/MediaViewer.qml:23492#: rc/qml/MediaViewer/MediaViewer.qml:241
99msgid "No"93msgid "No"
100msgstr ""94msgstr ""
10195
@@ -116,7 +110,7 @@
116msgstr ""110msgstr ""
117111
118#: rc/qml/Components/MediaSelector.qml:59112#: rc/qml/Components/MediaSelector.qml:59
119#: rc/qml/Components/MediaSelector.qml:80113#: rc/qml/Components/MediaSelector.qml:81
120msgid "Add to Album"114msgid "Add to Album"
121msgstr ""115msgstr ""
122116
@@ -161,115 +155,75 @@
161msgid "Delete %1 photos and %2 videos"155msgid "Delete %1 photos and %2 videos"
162msgstr ""156msgstr ""
163157
164#: rc/qml/EventsOverview.qml:151 rc/qml/PhotosOverview.qml:165158#: rc/qml/EventsOverview.qml:108 rc/qml/MainScreen.qml:200
159#: rc/qml/MainScreen.qml:252 rc/qml/PhotosOverview.qml:134
160#: rc/qml/PickerScreen.qml:139 rc/qml/PickerScreen.qml:186
161msgid "Select"
162msgstr ""
163
164#: rc/qml/EventsOverview.qml:127 rc/qml/PhotosOverview.qml:153
165#: rc/qml/Utility/EditingHUD.qml:77
166msgid "Add"
167msgstr ""
168
169#: rc/qml/EventsOverview.qml:145 rc/qml/MediaViewer/MediaViewer.qml:365
170#: rc/qml/PhotosOverview.qml:171 rc/qml/Utility/EditingHUD.qml:72
171msgid "Share"
172msgstr ""
173
174#: rc/qml/EventsOverview.qml:184 rc/qml/MediaViewer/MediaViewer.qml:186
175#: rc/qml/PhotosOverview.qml:196
165msgid "Share to"176msgid "Share to"
166msgstr ""177msgstr ""
167178
168#: rc/qml/LoadingScreen.qml:46179#: rc/qml/LoadingScreen.qml:39
169msgid "Loading…"180msgid "Loading…"
170msgstr ""181msgstr ""
171182
172#: rc/qml/MainScreen.qml:147183#: rc/qml/MainScreen.qml:148
173msgid "Albums"184msgid "Albums"
174msgstr ""185msgstr ""
175186
176#: rc/qml/MainScreen.qml:161 rc/qml/MainScreen.qml:190187#: rc/qml/MainScreen.qml:162 rc/qml/MainScreen.qml:202
177#: rc/qml/PickerScreen.qml:101188#: rc/qml/PickerScreen.qml:99
178msgid "Events"189msgid "Events"
179msgstr ""190msgstr ""
180191
181#: rc/qml/MainScreen.qml:188 rc/qml/MainScreen.qml:233192#: rc/qml/MainScreen.qml:211 rc/qml/MainScreen.qml:254
182#: rc/qml/PickerScreen.qml:141 rc/qml/PickerScreen.qml:194193#: rc/qml/PickerScreen.qml:150
183#: rc/qml/Utility/PhotosToolbarActions.qml:34
184msgid "Select"
185msgstr ""
186
187#: rc/qml/MainScreen.qml:199 rc/qml/MainScreen.qml:235
188#: rc/qml/PickerScreen.qml:152
189msgid "Photos"194msgid "Photos"
190msgstr ""195msgstr ""
191196
192#: rc/qml/MediaViewer/ExtrasPhotoEditorPage.qml:26197#: rc/qml/MediaViewer/MediaViewer.qml:219
193#: rc/qml/MediaViewer/GalleryPhotoEditorPage.qml:25
194msgid "Edit Photo"
195msgstr ""
196
197#: rc/qml/MediaViewer/MediaViewer.qml:212
198msgid "Delete a photo"198msgid "Delete a photo"
199msgstr ""199msgstr ""
200200
201#: rc/qml/MediaViewer/MediaViewer.qml:212201#: rc/qml/MediaViewer/MediaViewer.qml:219
202msgid "Delete a video"202msgid "Delete a video"
203msgstr ""203msgstr ""
204204
205#: rc/qml/MediaViewer/MediaViewer.qml:245205#: rc/qml/MediaViewer/MediaViewer.qml:252
206msgid "Remove a photo from album"206msgid "Remove a photo from album"
207msgstr ""207msgstr ""
208208
209#: rc/qml/MediaViewer/MediaViewer.qml:245209#: rc/qml/MediaViewer/MediaViewer.qml:252
210msgid "Remove a video from album"210msgid "Remove a video from album"
211msgstr ""211msgstr ""
212212
213#: rc/qml/MediaViewer/MediaViewer.qml:254213#: rc/qml/MediaViewer/MediaViewer.qml:261
214msgid "Remove from Album"214msgid "Remove from Album"
215msgstr ""215msgstr ""
216216
217#: rc/qml/MediaViewer/MediaViewer.qml:265217#: rc/qml/MediaViewer/MediaViewer.qml:272
218msgid "Remove from Album and Delete"218msgid "Remove from Album and Delete"
219msgstr ""219msgstr ""
220220
221#: rc/qml/MediaViewer/MediaViewer.qml:312221#: rc/qml/MediaViewer/MediaViewer.qml:319
222msgid "Edit"222msgid "Edit"
223msgstr ""223msgstr ""
224224
225#: rc/qml/MediaViewer/MediaViewer.qml:356 rc/qml/Utility/EditingHUD.qml:72225#: rc/qml/MediaViewer/PhotoEditorPage.qml:26
226#: rc/qml/Utility/SelectionToolbarAction.qml:65226msgid "Edit Photo"
227msgid "Share"
228msgstr ""
229
230#: rc/qml/MediaViewer/PhotoEditor.qml:43
231#: rc/qml/MediaViewer/PhotoEditor/CropOverlay.qml:349
232#: rc/qml/Utility/EditingHUD.qml:106
233msgid "Crop"
234msgstr ""
235
236#: rc/qml/MediaViewer/PhotoEditor.qml:52 rc/qml/Utility/EditingHUD.qml:99
237msgid "Rotate"
238msgstr ""
239
240#: rc/qml/MediaViewer/PhotoEditor.qml:196
241msgid "Revert to original"
242msgstr ""
243
244#: rc/qml/MediaViewer/PhotoEditor.qml:197
245msgid "This will undo all edits, including those from previous sessions."
246msgstr ""
247
248#: rc/qml/MediaViewer/PhotoEditor.qml:212
249msgid "Revert Photo"
250msgstr ""
251
252#: rc/qml/MediaViewer/PhotoEditor.qml:226
253msgid "Enhancing photo..."
254msgstr ""
255
256#: rc/qml/MediaViewer/PhotoEditor/EditStack.qml:114
257#: rc/qml/Utility/EditingHUD.qml:82
258msgid "Undo"
259msgstr ""
260
261#: rc/qml/MediaViewer/PhotoEditor/EditStack.qml:121
262#: rc/qml/Utility/EditingHUD.qml:87
263msgid "Redo"
264msgstr ""
265
266#: rc/qml/MediaViewer/PhotoEditor/EditStack.qml:128
267#: rc/qml/Utility/EditingHUD.qml:113
268msgid "Revert to Original"
269msgstr ""
270
271#: rc/qml/MediaViewer/PhotoEditor/ExposureAdjuster.qml:71
272msgid "Done"
273msgstr ""227msgstr ""
274228
275#: rc/qml/MediaViewer/PopupPhotoViewer.qml:46229#: rc/qml/MediaViewer/PopupPhotoViewer.qml:46
@@ -277,11 +231,15 @@
277msgid "Gallery"231msgid "Gallery"
278msgstr ""232msgstr ""
279233
280#: rc/qml/MediaViewer/PopupPhotoViewer.qml:167234#: rc/qml/MediaViewer/PopupPhotoViewer.qml:183
281msgid "Toggle Selection"235msgid "Toggle Selection"
282msgstr ""236msgstr ""
283237
284#: rc/qml/PickerScreen.qml:241238#: rc/qml/MediaViewer/SingleMediaViewer.qml:225
239msgid "An error has occurred attempting to load media"
240msgstr ""
241
242#: rc/qml/PickerScreen.qml:233
285msgid "Pick"243msgid "Pick"
286msgstr ""244msgstr ""
287245
@@ -293,10 +251,18 @@
293msgid "Post;Upload;Attach"251msgid "Post;Upload;Attach"
294msgstr ""252msgstr ""
295253
254#: rc/qml/Utility/EditingHUD.qml:82
255msgid "Undo"
256msgstr ""
257
296#: rc/qml/Utility/EditingHUD.qml:83258#: rc/qml/Utility/EditingHUD.qml:83
297msgid "Cancel Action;Backstep"259msgid "Cancel Action;Backstep"
298msgstr ""260msgstr ""
299261
262#: rc/qml/Utility/EditingHUD.qml:87
263msgid "Redo"
264msgstr ""
265
300#: rc/qml/Utility/EditingHUD.qml:88266#: rc/qml/Utility/EditingHUD.qml:88
301msgid "Reapply;Make Again"267msgid "Reapply;Make Again"
302msgstr ""268msgstr ""
@@ -313,6 +279,10 @@
313msgid "Automatically Adjust Photo"279msgid "Automatically Adjust Photo"
314msgstr ""280msgstr ""
315281
282#: rc/qml/Utility/EditingHUD.qml:99
283msgid "Rotate"
284msgstr ""
285
316#: rc/qml/Utility/EditingHUD.qml:100286#: rc/qml/Utility/EditingHUD.qml:100
317msgid "Turn Clockwise"287msgid "Turn Clockwise"
318msgstr ""288msgstr ""
@@ -321,6 +291,10 @@
321msgid "Rotate the image clockwise"291msgid "Rotate the image clockwise"
322msgstr ""292msgstr ""
323293
294#: rc/qml/Utility/EditingHUD.qml:106
295msgid "Crop"
296msgstr ""
297
324#: rc/qml/Utility/EditingHUD.qml:107298#: rc/qml/Utility/EditingHUD.qml:107
325msgid "Trim;Cut"299msgid "Trim;Cut"
326msgstr ""300msgstr ""
@@ -329,6 +303,10 @@
329msgid "Crop the image"303msgid "Crop the image"
330msgstr ""304msgstr ""
331305
306#: rc/qml/Utility/EditingHUD.qml:113
307msgid "Revert to Original"
308msgstr ""
309
332#: rc/qml/Utility/EditingHUD.qml:114310#: rc/qml/Utility/EditingHUD.qml:114
333msgid "Discard Changes"311msgid "Discard Changes"
334msgstr ""312msgstr ""
@@ -385,10 +363,6 @@
385msgid "Hue"363msgid "Hue"
386msgstr ""364msgstr ""
387365
388#: rc/qml/Utility/PhotosToolbarActions.qml:43
389msgid "Import"
390msgstr ""
391
392#: desktop/gallery-app.desktop.in.in.h:2366#: desktop/gallery-app.desktop.in.in.h:2
393msgid "Ubuntu Photo Viewer"367msgid "Ubuntu Photo Viewer"
394msgstr ""368msgstr ""
395369
=== modified file 'rc/qml/AlbumViewer/AlbumInternals/FramePortrait.qml'
--- rc/qml/AlbumViewer/AlbumInternals/FramePortrait.qml 2015-11-27 08:13:49 +0000
+++ rc/qml/AlbumViewer/AlbumInternals/FramePortrait.qml 2016-02-11 11:55:55 +0000
@@ -18,6 +18,7 @@
18 */18 */
1919
20import QtQuick 2.420import QtQuick 2.4
21import Ubuntu.Components 1.3
21import Gallery 1.022import Gallery 1.0
22import "../../../js/Gallery.js" as Gallery23import "../../../js/Gallery.js" as Gallery
2324
@@ -66,6 +67,22 @@
66 NumberAnimation { duration: Gallery.SNAP_DURATION }67 NumberAnimation { duration: Gallery.SNAP_DURATION }
67 }68 }
68 }69 }
70
71 Rectangle {
72 anchors.fill: parent
73 color: "black"
74 visible: preview.status == Image.Error
75
76 Icon {
77 anchors.centerIn: parent
78 width: isPreview ? units.gu(4) : units.gu(6)
79 height: width
80 name: "stock_image"
81 color: "white"
82 opacity: 0.8
83 }
84 }
85
69 Image {86 Image {
70 // Display a play icon if the thumbnail is from a video87 // Display a play icon if the thumbnail is from a video
71 source: "../../../img/icon_play.png"88 source: "../../../img/icon_play.png"
7289
=== modified file 'rc/qml/Components/MediaGrid.qml'
--- rc/qml/Components/MediaGrid.qml 2015-11-27 08:13:49 +0000
+++ rc/qml/Components/MediaGrid.qml 2016-02-11 11:55:55 +0000
@@ -81,7 +81,8 @@
8181
82 radius: "medium"82 radius: "medium"
83 property bool isLoading: source.status === Image.Loading83 property bool isLoading: source.status === Image.Loading
8484
85 backgroundColor: "black"
85 sourceFillMode: UbuntuShape.PreserveAspectCrop86 sourceFillMode: UbuntuShape.PreserveAspectCrop
86 source: Image {87 source: Image {
87 id: thumbImage88 id: thumbImage
@@ -94,11 +95,21 @@
94 }95 }
95 }96 }
9697
98 Icon {
99 anchors.centerIn: parent
100 width: units.gu(6)
101 height: width
102 visible: thumbImage.status == Image.Error
103 name: "stock_image"
104 color: "white"
105 opacity: 0.8
106 }
107
97 Image {108 Image {
98 // Display a play icon if the thumbnail is from a video109 // Display a play icon if the thumbnail is from a video
99 source: "../../img/icon_play.png"110 source: "../../img/icon_play.png"
100 anchors.centerIn: parent111 anchors.centerIn: parent
101 visible: mediaSource.type === MediaSource.Video112 visible: mediaSource.type === MediaSource.Video && thumbImage.status == Image.Ready
102 }113 }
103114
104 OrganicItemInteraction {115 OrganicItemInteraction {
105116
=== modified file 'rc/qml/MediaViewer/SingleMediaViewer.qml'
--- rc/qml/MediaViewer/SingleMediaViewer.qml 2015-11-05 19:04:22 +0000
+++ rc/qml/MediaViewer/SingleMediaViewer.qml 2016-02-11 11:55:55 +0000
@@ -81,7 +81,7 @@
81 ActivityIndicator {81 ActivityIndicator {
82 anchors.centerIn: parent82 anchors.centerIn: parent
83 visible: running83 visible: running
84 running: image.status != Image.Ready84 running: image.status != Image.Ready && image.status != Image.Error
85 }85 }
8686
87 PinchArea {87 PinchArea {
@@ -191,6 +191,41 @@
191 opacity: status == Image.Ready ? 1.0 : 0.0191 opacity: status == Image.Ready ? 1.0 : 0.0
192 fillMode: Image.PreserveAspectFit192 fillMode: Image.PreserveAspectFit
193 }193 }
194
195 Item {
196 id: mediaLoadingError
197 anchors.centerIn: parent
198 width: parent.width
199 height: mediaLoadingErrorIcon.height + units.gu(5) + mediaLoadingErrorLabel.contentHeight
200 visible: opacity > 0
201 opacity: image.status == Image.Error ? 1.0 : 0.0
202 Behavior on opacity { UbuntuNumberAnimation {duration: UbuntuAnimation.FastDuration} }
203
204 Icon {
205 id: mediaLoadingErrorIcon
206 anchors.horizontalCenter: parent.horizontalCenter
207 width: units.gu(8)
208 height: width
209 name: "stock_image"
210 color: "white"
211 opacity: 0.8
212 }
213
214 Label {
215 id: mediaLoadingErrorLabel
216 anchors {
217 horizontalCenter: parent.horizontalCenter
218 top: mediaLoadingErrorIcon.bottom
219 topMargin: units.gu(5)
220 }
221
222 width: units.gu(30)
223 wrapMode: Text.WordWrap
224 horizontalAlignment: Text.AlignHCenter
225 text: i18n.tr("An error has occurred attempting to load media")
226 fontSize: "large"
227 }
228 }
194 }229 }
195230
196 Icon {231 Icon {
@@ -200,7 +235,7 @@
200 name: "media-playback-start"235 name: "media-playback-start"
201 color: "white"236 color: "white"
202 opacity: 0.8237 opacity: 0.8
203 visible: viewer.isVideo238 visible: viewer.isVideo && image.status == Image.Ready
204 }239 }
205240
206 MouseArea {241 MouseArea {
@@ -251,7 +286,7 @@
251 anchors.centerIn: parent286 anchors.centerIn: parent
252 width: units.gu(10)287 width: units.gu(10)
253 height: units.gu(10)288 height: units.gu(10)
254 enabled: viewer.isVideo289 enabled: viewer.isVideo && image.status == Image.Ready
255 onClicked: {290 onClicked: {
256 if (viewer.isVideo) {291 if (viewer.isVideo) {
257 var url = mediaSource.path.toString().replace("file://", "video://");292 var url = mediaSource.path.toString().replace("file://", "video://");
258293
=== modified file 'rc/qml/OrganicView/OrganicMediaList.qml'
--- rc/qml/OrganicView/OrganicMediaList.qml 2015-11-27 08:13:49 +0000
+++ rc/qml/OrganicView/OrganicMediaList.qml 2016-02-11 11:55:55 +0000
@@ -167,10 +167,11 @@
167 }167 }
168 }168 }
169169
170 visible: source.status === Image.Ready170 visible: source.status === Image.Ready || source.status === Image.Error
171171
172 radius: "medium"172 radius: "medium"
173173
174 backgroundColor: "black"
174 sourceFillMode: UbuntuShape.PreserveAspectCrop175 sourceFillMode: UbuntuShape.PreserveAspectCrop
175 source: Image {176 source: Image {
176 id: thumbImage177 id: thumbImage
@@ -188,11 +189,21 @@
188 fillMode: Image.PreserveAspectCrop189 fillMode: Image.PreserveAspectCrop
189 }190 }
190191
192 Icon {
193 anchors.centerIn: parent
194 width: units.gu(6)
195 height: width
196 visible: thumbImage.status == Image.Error
197 name: "stock_image"
198 color: "white"
199 opacity: 0.8
200 }
201
191 Image {202 Image {
192 // Display a play icon if the thumbnail is from a video203 // Display a play icon if the thumbnail is from a video
193 source: "../../img/icon_play.png"204 source: "../../img/icon_play.png"
194 anchors.centerIn: parent205 anchors.centerIn: parent
195 visible: model.mediaSource.type === MediaSource.Video206 visible: model.mediaSource.type === MediaSource.Video && thumbImage.status == Image.Ready
196 }207 }
197208
198 OrganicItemInteraction {209 OrganicItemInteraction {

Subscribers

People subscribed via source and target branches