[vlc-commits] qml: add infoLeft and infoRight
Abel Tesfaye
git at videolan.org
Tue Jul 30 17:57:03 CEST 2019
vlc | branch: master | Abel Tesfaye <Abeltesfaye45 at gmail.com> | Sun Jun 9 19:09:55 2019 +0300| [29f46a3ffd1d507a07e9b8475e33ee7cc73c3de9] | committer: Jean-Baptiste Kempf
qml: add infoLeft and infoRight
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29f46a3ffd1d507a07e9b8475e33ee7cc73c3de9
---
modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml | 3 +++
modules/gui/qt/qml/style/VLCColors.qml | 2 ++
modules/gui/qt/qml/utils/GridItem.qml | 25 ++++++++++++++++++++++-
3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml b/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml
index 9438849324..b82d7077cd 100644
--- a/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml
@@ -44,6 +44,9 @@ Utils.NavigableFocusScope {
title: model.title || qsTr("Unknown title")
selected: element.DelegateModel.inSelected
shiftX: view.currentItem.shiftX(model.index)
+ infoLeft: model.duration
+ isVideo: true
+ isNew: model.playcount < 1
onItemClicked : {
delegateModel.updateSelection( modifier , view.currentItem.currentIndex, index)
diff --git a/modules/gui/qt/qml/style/VLCColors.qml b/modules/gui/qt/qml/style/VLCColors.qml
index 29dff18b02..a8e06d675e 100644
--- a/modules/gui/qt/qml/style/VLCColors.qml
+++ b/modules/gui/qt/qml/style/VLCColors.qml
@@ -75,6 +75,8 @@ Item {
property color volhigh: "#ffc70f"
property color volmax: "#f5271d"
+ property color videosGridInfoLeft: "grey"
+
//vlc orange
property color accent: "#FFFF950D";
diff --git a/modules/gui/qt/qml/utils/GridItem.qml b/modules/gui/qt/qml/utils/GridItem.qml
index fbfebe50d3..f0dafa356e 100644
--- a/modules/gui/qt/qml/utils/GridItem.qml
+++ b/modules/gui/qt/qml/utils/GridItem.qml
@@ -38,6 +38,9 @@ Rectangle {
property bool noActionButtons: false
property alias sourceSize: cover.sourceSize
+ property string infoLeft: ""
+ property bool isVideo: false
+ property bool isNew: false
signal playClicked
signal addToPlaylistClicked
@@ -211,7 +214,27 @@ Rectangle {
color: VLCStyle.colors.lightText
horizontalAlignment: Qt.AlignHCenter
}
+ RowLayout {
+ visible: isVideo
+ anchors {
+ bottom:parent.bottom
+ left: parent.left
+ right: parent.right
+ }
+ Text {
+ Layout.alignment: Qt.AlignLeft
+ font.pixelSize: VLCStyle.fontSize_small
+ color: VLCStyle.colors.videosGridInfoLeft
+ text: infoLeft
+ }
+ Text {
+ visible: root.isNew
+ Layout.alignment: Qt.AlignRight
+ font.pixelSize: VLCStyle.fontSize_small
+ color: VLCStyle.colors.accent
+ text: "NEW"
}
}
}
-
+}
+}
More information about the vlc-commits
mailing list