[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: fix seekbar chapter marks

Jean-Baptiste Kempf gitlab at videolan.org
Mon May 24 15:30:15 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
bafae3cb by Prince Gupta at 2021-05-24T15:14:17+00:00
qml: fix seekbar chapter marks

closes #25588

- - - - -
0c15fe95 by Prince Gupta at 2021-05-24T15:14:17+00:00
qml: show chapter marks on activity in player

- - - - -


3 changed files:

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


Changes:

=====================================
modules/gui/qt/player/qml/ControlBar.qml
=====================================
@@ -47,6 +47,10 @@ Widgets.NavigableFocusScope {
 
     signal requestLockUnlockAutoHide(bool lock, var source)
 
+    function showChapterMarks() {
+        trackPositionSlider.showChapterMarks()
+    }
+
     Keys.priority: Keys.AfterItem
     Keys.onPressed: defaultKeyAction(event, 0)
     onActionCancel: history.previous()


=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -501,6 +501,11 @@ Widgets.NavigableFocusScope {
         state: "visible"
         edge: Widgets.DrawerExt.Edges.Bottom
 
+        onStateChanged: {
+            if (state === "visible")
+                contentItem.showChapterMarks()
+        }
+
         component: MouseArea {
             id: controllerMouseArea
 
@@ -510,6 +515,10 @@ Widgets.NavigableFocusScope {
             width: controlBarView.width
             hoverEnabled: true
 
+            function showChapterMarks() {
+                controllerId.showChapterMarks()
+            }
+
             onContainsMouseChanged: rootPlayer.lockUnlockAutoHide(containsMouse, topcontrolView)
 
             ControlBar {


=====================================
modules/gui/qt/player/qml/SliderBar.qml
=====================================
@@ -39,6 +39,11 @@ Slider {
     Keys.onRightPressed: player.jumpFwd()
     Keys.onLeftPressed: player.jumpBwd()
 
+    function showChapterMarks() {
+        _isSeekPointsShown = true
+        seekpointTimer.restart()
+    }
+
     Timer {
         id: seekpointTimer
         running: player.hasChapters && !control.hovered && _isSeekPointsShown
@@ -201,10 +206,13 @@ Slider {
             }
         }
 
-        RowLayout {
+        Item {
             id: seekpointsRow
-            spacing: 0
+
+            width: parent.width
+            height: control.barHeight
             visible: player.hasChapters
+
             Repeater {
                 id: seekpointsRptr
                 model: player.chapters



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0289edadff52734c2509ee62364507a09205c492...0c15fe95030e88e562f5af0f13434a775a21671f

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0289edadff52734c2509ee62364507a09205c492...0c15fe95030e88e562f5af0f13434a775a21671f
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list