[vlc-commits] qml: use MCVideoListDisplay
Abel Tesfaye
git at videolan.org
Tue Aug 20 18:21:21 CEST 2019
vlc | branch: master | Abel Tesfaye <Abeltesfaye45 at gmail.com> | Fri Aug 2 13:56:55 2019 +0300| [ab338159abdd6e399d8c00881cc865849737a491] | committer: Jean-Baptiste Kempf
qml: use MCVideoListDisplay
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ab338159abdd6e399d8c00881cc865849737a491
---
modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml | 32 ++++++++--------------
.../gui/qt/qml/mediacenter/MCVideoListDisplay.qml | 2 +-
2 files changed, 13 insertions(+), 21 deletions(-)
diff --git a/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml b/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml
index 59dfaf8456..62cb23b218 100644
--- a/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/MCVideoDisplay.qml
@@ -62,7 +62,7 @@ Utils.NavigableFocusScope {
onTriggered: medialib.addToPlaylist( contextMenu.model.id )
}
Utils.MenuItemExt {
- enabled:root.currentGridView.switchExpandItem !== undefined
+ enabled: root.currentGridView && root.currentGridView.switchExpandItem !== undefined
text: "Information"
onTriggered: {
root.currentGridView.switchExpandItem(contextMenu.model.index,root.currentGridView.currentItem)
@@ -384,25 +384,17 @@ Utils.NavigableFocusScope {
Component {
id: listComponent
- /* ListView */
- Utils.KeyNavigableListView {
- id: listView_id
-
- model: videosDelegate.parts.list
- modelCount: videosDelegate.items.count
-
- focus: true
- spacing: VLCStyle.margin_xxxsmall
-
- onSelectAll: videosDelegate.selectAll()
- onSelectionUpdated: videosDelegate.updateSelection( keyModifiers, oldIndex, newIndex )
- onActionAtIndex: videosDelegate.actionAtIndex(index)
-
- onActionLeft: root.actionLeft(index)
- onActionRight: root.actionRight(index)
- onActionDown: root.actionDown(index)
- onActionUp: root.actionUp(index)
- onActionCancel: root.actionCancel(index)
+ MCVideoListDisplay {
+ height: view.height
+ width: view.width
+ onContextMenuButtonClicked:{
+ contextMenu.model = menuModel
+ contextMenu.popup(menuParent)
+ }
+ onRightClick:{
+ contextMenu.model = menuModel
+ contextMenu.popup(menuParent)
+ }
}
}
diff --git a/modules/gui/qt/qml/mediacenter/MCVideoListDisplay.qml b/modules/gui/qt/qml/mediacenter/MCVideoListDisplay.qml
index 887b088f25..28c81f1b1f 100644
--- a/modules/gui/qt/qml/mediacenter/MCVideoListDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/MCVideoListDisplay.qml
@@ -37,7 +37,7 @@ Utils.KeyNavigableTableView {
}
section.property: "title_first_symbol"
- rowHeight: VLCStyle.video_small_height
+ rowHeight: VLCStyle.video_small_height + VLCStyle.margin_normal
headerColor: VLCStyle.colors.bg
spacing: VLCStyle.margin_small
More information about the vlc-commits
mailing list