Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Dröge
VLC
Commits
914a05ff
Commit
914a05ff
authored
3 years ago
by
Benjamin Arnaud
Committed by
Jean-Baptiste Kempf
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
qml/VideoDisplayRecentVideos: Add contextual menu support
fix #26275
parent
447c4e0b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml
+22
-8
22 additions, 8 deletions
modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml
with
22 additions
and
8 deletions
modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml
+
22
−
8
View file @
914a05ff
...
...
@@ -32,11 +32,11 @@ FocusScope {
// Properties
property
Item
focusItem
:
recentVideosL
istView
property
Item
focusItem
:
l
istView
property
int
currentIndex
:
-
1
property
var
model
:
undefined
;
property
var
model
:
undefined
// Properties
...
...
@@ -60,7 +60,7 @@ FocusScope {
// Functions
function
setCurrentItemFocus
(
reason
)
{
recentVideosL
istView
.
setCurrentItemFocus
(
reason
);
l
istView
.
setCurrentItemFocus
(
reason
);
}
function
_actionAtIndex
(
index
,
model
,
selectionModel
)
{
...
...
@@ -75,6 +75,12 @@ FocusScope {
model
:
root
.
model
}
VideoContextMenu
{
id
:
contextMenu
model
:
root
.
model
}
Column
{
id
:
recentVideosColumn
...
...
@@ -95,7 +101,7 @@ FocusScope {
}
Widgets.KeyNavigableListView
{
id
:
recentVideosL
istView
id
:
l
istView
width
:
parent
.
width
...
...
@@ -125,10 +131,11 @@ FocusScope {
}
delegate
:
VideoGridItem
{
id
:
recentVideoG
ridItem
id
:
g
ridItem
x
:
selectedBorderWidth
y
:
selectedBorderWidth
pictureWidth
:
VLCStyle
.
gridCover_video_width
pictureHeight
:
VLCStyle
.
gridCover_video_height
...
...
@@ -137,12 +144,19 @@ FocusScope {
unselectedUnderlay
:
shadows
.
unselected
selectedUnderlay
:
shadows
.
selected
onItemDoubleClicked
:
recentVideoG
ridItem
.
play
()
onItemDoubleClicked
:
g
ridItem
.
play
()
onItemClicked
:
{
recentVideoSelection
.
updateSelection
(
modifier
,
root
.
model
.
currentIndex
,
index
)
recentVideosListView
.
currentIndex
=
index
recentVideosListView
.
forceActiveFocus
()
listView
.
currentIndex
=
index
listView
.
forceActiveFocus
()
}
// NOTE: contextMenu.popup wants a list of indexes.
onContextMenuButtonClicked
:
{
contextMenu
.
popup
([
root
.
model
.
index
(
index
,
0
)],
globalMousePos
,
{
"
player-options
"
:
[
"
:restore-playback-pos=2
"
]
})
}
Connections
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment