~artmello/gallery-app/gallery-app-fix_1523573

« back to all changes in this revision

Viewing changes to rc/qml/OrganicView/OrganicMediaList.qml

  • Committer: Arthur Mello
  • Date: 2016-03-07 20:20:03 UTC
  • mfrom: (1265.1.17 gallery-app)
  • Revision ID: arthur.mello@canonical.com-20160307202003-8f21kqk316683azd
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
                    }
168
168
                }
169
169
 
170
 
                visible: source.status === Image.Ready
 
170
                visible: source.status === Image.Ready || source.status === Image.Error
171
171
 
172
172
                radius: "medium"
173
173
 
 
174
                backgroundColor: "black"
174
175
                sourceFillMode: UbuntuShape.PreserveAspectCrop
175
176
                source: Image {
176
177
                    id: thumbImage
182
183
                     * result as the previous thumbnailer, we force it to generate a large thumbnail, which
183
184
                     * is closer to the older one in size and looks identical when downscaled */
184
185
                    sourceSize {
185
 
                        width: thumbnail.width
186
 
                        height: thumbnail.height
 
186
                        // Make sure to request a thumbnail big enough to handle all the possible sizes
 
187
                        // that way media items will not request a new one every time it changes its
 
188
                        // position
 
189
                        width: __bigSize
 
190
                        height: __bigSize
187
191
                    }
188
192
                    fillMode: Image.PreserveAspectCrop
189
193
                }
190
194
 
 
195
                Icon {
 
196
                    anchors.centerIn: parent
 
197
                    width: units.gu(6)
 
198
                    height: width
 
199
                    visible: thumbImage.status == Image.Error
 
200
                    name: "stock_image"
 
201
                    color: "white"
 
202
                    opacity: 0.8
 
203
                }
 
204
 
191
205
                Image {
192
206
                    // Display a play icon if the thumbnail is from a video
193
207
                    source: "../../img/icon_play.png"
194
208
                    anchors.centerIn: parent
195
 
                    visible: model.mediaSource.type === MediaSource.Video
 
209
                    visible: model.mediaSource.type === MediaSource.Video && thumbImage.status == Image.Ready
196
210
                }
197
211
 
198
212
                OrganicItemInteraction {