[vlc-commits] [Git][videolan/vlc][master] 3 commits: qml: fix seek handle not accessible with playlistview

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Fri Jul 8 15:31:00 UTC 2022



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
fb7f6668 by Prince Gupta at 2022-07-08T14:38:53+00:00
qml: fix seek handle not accessible with playlistview

- - - - -
072a7099 by Prince Gupta at 2022-07-08T14:38:53+00:00
qml: allow to hide texts from control bar component

- - - - -
56a87b96 by Prince Gupta at 2022-07-08T14:38:53+00:00
qml: hide texts when they overlap with playlistview

hides right text of control bar when appropriate

- - - - -


2 changed files:

- modules/gui/qt/player/qml/ControlBar.qml
- modules/gui/qt/player/qml/Player.qml


Changes:

=====================================
modules/gui/qt/player/qml/ControlBar.qml
=====================================
@@ -44,6 +44,7 @@ Control {
     property alias identifier: playerControlLayout.identifier
     property alias sliderHeight: trackPositionSlider.barHeight
     property alias sliderBackgroundColor: trackPositionSlider.backgroundColor
+    property bool showRightTimeText: true
 
     signal requestLockUnlockAutoHide(bool lock, var source)
 
@@ -68,9 +69,11 @@ Control {
     function _layout() {
         trackPositionSlider.visible = true
         mediaTime.visible = true
-        mediaRemainingTime.visible = true
+
+        mediaRemainingTime.visible = Qt.binding(function() { return root.showRightTimeText && textPosition !== ControlBar.TimeTextPosition.Hide; })
         mediaTime.font.pixelSize = Qt.binding(function() { return VLCStyle.fontSize_normal })
         mediaRemainingTime.font.pixelSize = Qt.binding(function() { return VLCStyle.fontSize_normal })
+
         row2.Layout.leftMargin = 0
         row2.Layout.rightMargin = 0
 
@@ -79,7 +82,6 @@ Control {
             row1.children = []
             row2.children = [trackPositionSlider]
             mediaTime.visible = false
-            mediaRemainingTime.visible = false
             break;
 
         case ControlBar.TimeTextPosition.AboveSlider:


=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -564,60 +564,6 @@ FocusScope {
         }
     }
 
-    Widgets.DrawerExt {
-        id: controlBarView
-
-        readonly property int sliderY: rootPlayer.pinVideoControls ? contentItem.sliderY - VLCStyle.margin_xxxsmall : contentItem.sliderY
-
-        anchors {
-            bottom: parent.bottom
-            left: parent.left
-            right: parent.right
-        }
-        focus: true
-        state: "visible"
-        edge: Widgets.DrawerExt.Edges.Bottom
-
-        onStateChanged: {
-            if (state === "visible")
-                contentItem.showChapterMarks()
-        }
-
-        component: MouseArea {
-            id: controllerMouseArea
-
-            readonly property alias sliderY: controllerId.sliderY
-
-            height: controllerId.implicitHeight + controllerId.anchors.bottomMargin
-            width: controlBarView.width
-            hoverEnabled: true
-
-            function showChapterMarks() {
-                controllerId.showChapterMarks()
-            }
-
-            onContainsMouseChanged: rootPlayer.lockUnlockAutoHide(containsMouse, topcontrolView)
-
-            ControlBar {
-                id: controllerId
-                focus: true
-                anchors.fill: parent
-                anchors.leftMargin: VLCStyle.applicationHorizontalMargin
-                anchors.rightMargin: VLCStyle.applicationHorizontalMargin
-                anchors.bottomMargin: VLCStyle.applicationVerticalMargin
-                colors: rootPlayer.colors
-                textPosition: rootPlayer.pinVideoControls ? ControlBar.TimeTextPosition.LeftRightSlider : ControlBar.TimeTextPosition.AboveSlider
-                Navigation.parentItem: rootPlayer
-                Navigation.upItem: playlistpopup.showPlaylist ? playlistpopup : (audioControls.visible ? audioControls : topcontrolView)
-
-                onRequestLockUnlockAutoHide: rootPlayer.lockUnlockAutoHide(lock, source)
-
-                identifier: (Player.hasVideoOutput) ? PlayerControlbarModel.Videoplayer
-                                                    : PlayerControlbarModel.Audioplayer
-            }
-        }
-    }
-
     Widgets.DrawerExt {
         id: playlistpopup
 
@@ -685,6 +631,64 @@ FocusScope {
         }
     }
 
+    Widgets.DrawerExt {
+        id: controlBarView
+
+        readonly property int sliderY: rootPlayer.pinVideoControls ? contentItem.sliderY - VLCStyle.margin_xxxsmall : contentItem.sliderY
+
+        anchors {
+            bottom: parent.bottom
+            left: parent.left
+            right: parent.right
+        }
+        focus: true
+        state: "visible"
+        edge: Widgets.DrawerExt.Edges.Bottom
+
+        onStateChanged: {
+            if (state === "visible")
+                contentItem.showChapterMarks()
+        }
+
+        component: MouseArea {
+            id: controllerMouseArea
+
+            readonly property alias sliderY: controllerId.sliderY
+
+            height: controllerId.implicitHeight + controllerId.anchors.bottomMargin
+            width: controlBarView.width
+            hoverEnabled: true
+
+            function showChapterMarks() {
+                controllerId.showChapterMarks()
+            }
+
+            onContainsMouseChanged: rootPlayer.lockUnlockAutoHide(containsMouse, topcontrolView)
+
+            ControlBar {
+                id: controllerId
+
+                focus: true
+                anchors.fill: parent
+                anchors.leftMargin: VLCStyle.applicationHorizontalMargin
+                anchors.rightMargin: VLCStyle.applicationHorizontalMargin
+                anchors.bottomMargin: VLCStyle.applicationVerticalMargin
+
+                colors: rootPlayer.colors
+                textPosition: rootPlayer.pinVideoControls ? ControlBar.TimeTextPosition.LeftRightSlider : ControlBar.TimeTextPosition.AboveSlider
+                showRightTimeText: (textPosition !== ControlBar.TimeTextPosition.AboveSlider) || !playlistVisibility.isPlaylistVisible
+
+                Navigation.parentItem: rootPlayer
+                Navigation.upItem: playlistpopup.showPlaylist ? playlistpopup : (audioControls.visible ? audioControls : topcontrolView)
+
+                onRequestLockUnlockAutoHide: rootPlayer.lockUnlockAutoHide(lock, source)
+
+                identifier: (Player.hasVideoOutput) ? PlayerControlbarModel.Videoplayer
+                                                    : PlayerControlbarModel.Audioplayer
+            }
+        }
+    }
+
     Timer {
         id: toolbarAutoHide
         running: true



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/329cc5b9eddd3cf5cac7c5711a2a24b707422142...56a87b96a5051a50412e33541232b8ba53674328

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/329cc5b9eddd3cf5cac7c5711a2a24b707422142...56a87b96a5051a50412e33541232b8ba53674328
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