started work on icon/thumbnail view

This commit is contained in:
itsmattkc
2018-12-24 00:59:33 +11:00
parent a53aac2366
commit ceb0078b2e
9 changed files with 88 additions and 36 deletions
+9
View File
@@ -253,6 +253,15 @@ QVariant Media::data(int column, int role) {
switch (role) {
case Qt::DecorationRole:
if (column == 0) {
if (config.project_view_type == PROJECT_VIEW_ICON
&& get_type() == MEDIA_TYPE_FOOTAGE) {
Footage* f = to_footage();
if (f->video_tracks.size() > 0
&& f->video_tracks.at(0)->preview_done) {
return QIcon(QPixmap::fromImage(f->video_tracks.at(0)->video_preview));
}
}
return icon;
}
break;