[vlc-commits] qml: remove isVideo, isNew, infoLeft and 'NEW' label from GridItem
Prince Gupta
git at videolan.org
Fri Jul 3 14:59:25 CEST 2020
vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Sun Jun 21 23:23:27 2020 +0530| [feff28a761c96eb6b8602328531f05b7032e75b5] | committer: Pierre Lamot
qml: remove isVideo, isNew, infoLeft and 'NEW' label from GridItem
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=feff28a761c96eb6b8602328531f05b7032e75b5
---
modules/gui/qt/medialibrary/qml/AudioGridItem.qml | 1 -
modules/gui/qt/medialibrary/qml/VideoGridItem.qml | 4 +--
modules/gui/qt/widgets/qml/GridItem.qml | 33 +++--------------------
3 files changed, 4 insertions(+), 34 deletions(-)
diff --git a/modules/gui/qt/medialibrary/qml/AudioGridItem.qml b/modules/gui/qt/medialibrary/qml/AudioGridItem.qml
index 84eb37ff19..8db11c9788 100644
--- a/modules/gui/qt/medialibrary/qml/AudioGridItem.qml
+++ b/modules/gui/qt/medialibrary/qml/AudioGridItem.qml
@@ -27,7 +27,6 @@ Widgets.GridItem {
image: model.cover || VLCStyle.noArtAlbum
title: model.title || i18n.qtr("Unknown title")
subtitle: model.main_artist || i18n.qtr("Unknown artist")
- isVideo: false
pictureWidth: VLCStyle.cover_normal
pictureHeight: VLCStyle.cover_normal
}
diff --git a/modules/gui/qt/medialibrary/qml/VideoGridItem.qml b/modules/gui/qt/medialibrary/qml/VideoGridItem.qml
index 368dd1b221..4e11c04be7 100644
--- a/modules/gui/qt/medialibrary/qml/VideoGridItem.qml
+++ b/modules/gui/qt/medialibrary/qml/VideoGridItem.qml
@@ -26,13 +26,11 @@ Widgets.GridItem {
property var model: ({})
image: model.thumbnail || VLCStyle.noArtCover
title: model.title || i18n.qtr("Unknown title")
- infoLeft: model.duration || ""
+ subtitle: model.duration || ""
labels: [
model.resolution_name || "",
model.channel || ""
].filter(function(a) { return a !== "" } )
- isVideo: true
- isNew: model.playcount < 1
progress: model.progress > 0 ? model.progress : 0
pictureWidth: VLCStyle.video_normal_width
pictureHeight: VLCStyle.video_normal_height
diff --git a/modules/gui/qt/widgets/qml/GridItem.qml b/modules/gui/qt/widgets/qml/GridItem.qml
index 680b36a07a..4269cf9df2 100644
--- a/modules/gui/qt/widgets/qml/GridItem.qml
+++ b/modules/gui/qt/widgets/qml/GridItem.qml
@@ -33,13 +33,10 @@ Item {
property string subtitle: ""
property bool selected: false
- property string infoLeft: ""
- property bool isVideo: false
- property bool isNew: false
property double progress: 0
property var labels: []
- property real pictureWidth: isVideo ? VLCStyle.video_normal_width : VLCStyle.cover_small
- property real pictureHeight: isVideo ? VLCStyle.video_normal_height : VLCStyle.cover_small
+ property real pictureWidth: VLCStyle.colWidth(1)
+ property real pictureHeight: ( pictureWidth * 10 ) / 16
//space use for zoom
readonly property real outterMargin: VLCStyle.margin_xxsmall
@@ -171,7 +168,7 @@ Item {
VideoProgressBar {
value: root.progress
- visible: isVideo && root.progress > 0
+ visible: root.progress > 0
anchors {
bottom: parent.bottom
left: parent.left
@@ -211,30 +208,6 @@ Item {
}
- RowLayout {
- visible: isVideo
-
- Layout.preferredHeight: implicitHeight
- Layout.fillWidth: true
- Layout.maximumWidth: _picWidth
-
- Text {
- Layout.alignment: Qt.AlignLeft
- Layout.fillWidth: true
- font.pixelSize: VLCStyle.fontSize_small
- color: VLCStyle.colors.textInactive
- text: infoLeft
- }
- Text {
- visible: root.isNew
- Layout.alignment: Qt.AlignRight
- font.pixelSize: VLCStyle.fontSize_small
- color: root.activeFocus ? VLCStyle.colors.text : VLCStyle.colors.accent
- text: "NEW"
- font.bold: true
- }
- }
-
Item {
Layout.fillHeight: true
}
More information about the vlc-commits
mailing list