[vlc-commits] [Git][videolan/vlc][master] qt: playlist: VLC 4: Double-clicking window titlebar regardless of speed maximizes it
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Fri Nov 19 16:16:50 UTC 2021
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
34e92dd3 by Advait Gupta at 2021-11-19T15:48:53+00:00
qt: playlist: VLC 4: Double-clicking window titlebar regardless of speed maximizes it
Fixes #26276
The CSDTitlebarTapnDragHandler snippet was using the onTapped signal without any set delay between the clicks which was causing the windows to maximize even when the second click was long after the first one. Fixed this issue by replacing that signal with onDoubleTapped in which the signal is emitted only when the parent item is tapped twice between a short span of time.
The window is now maximizing/minimizing only on proper double taps as tested on my local computer.
- - - - -
1 changed file:
- modules/gui/qt/widgets/qml/CSDTitlebarTapNDrapHandler.qml
Changes:
=====================================
modules/gui/qt/widgets/qml/CSDTitlebarTapNDrapHandler.qml
=====================================
@@ -22,14 +22,14 @@ import QtQuick.Window 2.15
Item {
TapHandler {
- onTapped: {
- if (tapCount === 2) {
+ onDoubleTapped: {
+
if ((topWindow.visibility & Window.Maximized) !== 0) {
mainInterface.requestInterfaceNormal()
} else {
mainInterface.requestInterfaceMaximized()
}
- }
+
}
gesturePolicy: TapHandler.DragThreshold
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/34e92dd309483d170b92ff9efcb275ae571dbe2d
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/34e92dd309483d170b92ff9efcb275ae571dbe2d
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list