[vlc-commits] qml: add ListCoverShadow widget

Prince Gupta git at videolan.org
Thu Dec 17 14:57:16 UTC 2020


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Mon Dec  7 16:45:33 2020 +0530| [eb48de6d2d34b77248690d66b6293435997a96bd] | committer: Pierre Lamot

qml: add ListCoverShadow widget

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eb48de6d2d34b77248690d66b6293435997a96bd
---

 modules/gui/qt/Makefile.am                     |  1 +
 modules/gui/qt/vlc.qrc                         |  1 +
 modules/gui/qt/widgets/qml/ListCoverShadow.qml | 32 ++++++++++++++++++++++++++
 3 files changed, 34 insertions(+)

diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index 1e2c14f650..90a81e9e09 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -714,6 +714,7 @@ libqt_plugin_la_QML = \
 	gui/qt/widgets/qml/KeyNavigableListView.qml \
 	gui/qt/widgets/qml/KeyNavigableTableView.qml \
 	gui/qt/widgets/qml/LabelSeparator.qml \
+	gui/qt/widgets/qml/ListCoverShadow.qml \
 	gui/qt/widgets/qml/ListItem.qml \
 	gui/qt/widgets/qml/ListLabel.qml \
 	gui/qt/widgets/qml/LocalTabBar.qml \
diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc
index 080c9c0246..10193b2e55 100644
--- a/modules/gui/qt/vlc.qrc
+++ b/modules/gui/qt/vlc.qrc
@@ -242,6 +242,7 @@
         <file alias="IconButton.qml">widgets/qml/IconButton.qml</file>
         <file alias="DragItem.qml">widgets/qml/DragItem.qml</file>
         <file alias="CoverShadow.qml">widgets/qml/CoverShadow.qml</file>
+        <file alias="ListCoverShadow.qml">widgets/qml/ListCoverShadow.qml</file>
     </qresource>
     <qresource prefix="/network">
         <file alias="AddressbarButton.qml">network/qml/AddressbarButton.qml</file>
diff --git a/modules/gui/qt/widgets/qml/ListCoverShadow.qml b/modules/gui/qt/widgets/qml/ListCoverShadow.qml
new file mode 100644
index 0000000000..82b9d46203
--- /dev/null
+++ b/modules/gui/qt/widgets/qml/ListCoverShadow.qml
@@ -0,0 +1,32 @@
+
+/*****************************************************************************
+ * Copyright (C) 2020 VLC authors and VideoLAN
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * ( at your option ) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+import QtQuick 2.11
+import QtGraphicalEffects 1.0
+
+import "qrc:///style/"
+import "qrc:///util/KeyHelper.js" as KeyHelper
+
+CoverShadow {
+    id: root
+
+    primaryVerticalOffset: VLCStyle.dp(6, VLCStyle.scale)
+    primaryRadius: VLCStyle.dp(14, VLCStyle.scale)
+    secondaryVerticalOffset: VLCStyle.dp(1, VLCStyle.scale)
+    secondaryRadius: VLCStyle.dp(3, VLCStyle.scale)
+}



More information about the vlc-commits mailing list