[vlc-commits] qml: introduce MainGridView and MainTableView in MainInterface

Prince Gupta git at videolan.org
Fri Nov 27 14:52:33 CET 2020


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Fri Nov 20 23:26:54 2020 +0530| [0370bc5ec519c041e2b11d8a0da5ba94d403ca47] | committer: Pierre Lamot

qml: introduce MainGridView and MainTableView in MainInterface

for now they provide bottom margin for main views when miniplayer is visible

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

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

 modules/gui/qt/Makefile.am                         |  2 ++
 modules/gui/qt/maininterface/qml/MainGridView.qml  | 28 +++++++++++++++++++++
 modules/gui/qt/maininterface/qml/MainTableView.qml | 29 ++++++++++++++++++++++
 modules/gui/qt/vlc.qrc                             |  2 ++
 4 files changed, 61 insertions(+)

diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index 12cb152f2d..4cc7f21eb7 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -615,6 +615,8 @@ libqt_plugin_la_QML = \
 	gui/qt/maininterface/qml/BannerSources.qml \
 	gui/qt/maininterface/qml/MainInterface.qml \
 	gui/qt/maininterface/qml/MainDisplay.qml \
+	gui/qt/maininterface/qml/MainGridView.qml \
+	gui/qt/maininterface/qml/MainTableView.qml \
 	gui/qt/maininterface/qml/MiniPlayerBottomMargin.qml \
 	gui/qt/maininterface/qml/NoMedialibHome.qml \
 	gui/qt/medialibrary/qml/ArtistTopBanner.qml \
diff --git a/modules/gui/qt/maininterface/qml/MainGridView.qml b/modules/gui/qt/maininterface/qml/MainGridView.qml
new file mode 100644
index 0000000000..e8bb76c32f
--- /dev/null
+++ b/modules/gui/qt/maininterface/qml/MainGridView.qml
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * 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 "qrc:///widgets/" as Widgets
+
+Widgets.ExpandGridView {
+    id: root
+
+    footerDelegate: MiniPlayerBottomMargin {
+        width: root.width
+    }
+}
diff --git a/modules/gui/qt/maininterface/qml/MainTableView.qml b/modules/gui/qt/maininterface/qml/MainTableView.qml
new file mode 100644
index 0000000000..0828a16e1f
--- /dev/null
+++ b/modules/gui/qt/maininterface/qml/MainTableView.qml
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * 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 "qrc:///widgets/" as Widgets
+
+Widgets.KeyNavigableTableView {
+    id: root
+
+    footer: MiniPlayerBottomMargin {
+        width: root.width
+    }
+}
diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc
index b5cca63622..fb470a9afa 100644
--- a/modules/gui/qt/vlc.qrc
+++ b/modules/gui/qt/vlc.qrc
@@ -180,6 +180,8 @@
         <file alias="MainInterface.qml">maininterface/qml/MainInterface.qml</file>
         <file alias="MainDisplay.qml">maininterface/qml/MainDisplay.qml</file>
         <file alias="NoMedialibHome.qml">maininterface/qml/NoMedialibHome.qml</file>
+        <file alias="MainTableView.qml">maininterface/qml/MainTableView.qml</file>
+        <file alias="MainGridView.qml">maininterface/qml/MainGridView.qml</file>
         <file alias="MiniPlayerBottomMargin.qml">maininterface/qml/MiniPlayerBottomMargin.qml</file>
     </qresource>
     <qresource prefix="/widgets">



More information about the vlc-commits mailing list