[vlc-commits] [Git][videolan/vlc][master] qml: trigger right-click action on touchscreen long press
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Jan 26 15:15:47 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
dda6d04f by Yann Lochet at 2023-01-26T14:25:18+00:00
qml: trigger right-click action on touchscreen long press
- - - - -
3 changed files:
- modules/gui/qt/playlist/qml/PlaylistDelegate.qml
- modules/gui/qt/widgets/qml/GridItem.qml
- modules/gui/qt/widgets/qml/TableViewDelegate.qml
Changes:
=====================================
modules/gui/qt/playlist/qml/PlaylistDelegate.qml
=====================================
@@ -275,6 +275,10 @@ T.Control {
moveSelected()
}
}
+
+ onLongPressed: {
+ contextMenu.popup(index, point.scenePosition)
+ }
}
}
=====================================
modules/gui/qt/widgets/qml/GridItem.qml
=====================================
@@ -215,6 +215,10 @@ T.Control {
root.itemClicked(picture, Qt.LeftButton, Qt.NoModifier)
root.itemDoubleClicked(picture, Qt.LeftButton, Qt.NoModifier)
}
+
+ onLongPressed: {
+ contextMenuButtonClicked(picture, point.scenePosition);
+ }
}
MouseHoverHandlerCompat {
=====================================
modules/gui/qt/widgets/qml/TableViewDelegate.qml
=====================================
@@ -163,6 +163,10 @@ T.Control {
delegate.selectAndFocus(Qt.NoModifier, Qt.MouseFocusReason)
delegate.itemDoubleClicked(delegate._index, delegate.rowModel)
}
+
+ onLongPressed: {
+ delegate.rightClick(delegate, delegate.rowModel, point.scenePosition)
+ }
}
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dda6d04f76de934b1caf4d40d634f58a3d08dd09
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dda6d04f76de934b1caf4d40d634f58a3d08dd09
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list