[vlc-commits] [Git][videolan/vlc][master] 12 commits: qml: inherit Pane template in ControlBar

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Jun 23 05:16:34 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
5478d199 by Fatih Uzunoglu at 2023-06-23T05:01:04+00:00
qml: inherit Pane template in ControlBar

- - - - -
eddaaafa by Fatih Uzunoglu at 2023-06-23T05:01:04+00:00
qml: inherit ControlBar in MiniPlayer

- - - - -
115f2908 by Fatih Uzunoglu at 2023-06-23T05:01:04+00:00
qml: remove unnecessary imports in MiniPlayer.qml

- - - - -
02d4c102 by Fatih Uzunoglu at 2023-06-23T05:01:04+00:00
qml: fix broken logic in Player.qml

- - - - -
e9d1156a by Fatih Uzunoglu at 2023-06-23T05:01:04+00:00
qml: determine background in ControlBar.qml

- - - - -
8656cbde by Fatih Uzunoglu at 2023-06-23T05:01:04+00:00
qml: remove the unnecessary mouse area in MiniPlayer

- - - - -
3ff117ec by Fatih Uzunoglu at 2023-06-23T05:01:04+00:00
qml: use declarative approach in ControlBar.qml

- - - - -
85e1dfcb by Fatih Uzunoglu at 2023-06-23T05:01:04+00:00
qml: do not fill height in sub-layouts in ControlBar.qml

- - - - -
6874ad94 by Fatih Uzunoglu at 2023-06-23T05:01:04+00:00
qml: use a pseudo row as a workaround to Qt bug

- - - - -
b2c3c991 by Fatih Uzunoglu at 2023-06-23T05:01:04+00:00
qml: remove unnecessary mouse area in Player.qml

- - - - -
c9dc6763 by Fatih Uzunoglu at 2023-06-23T05:01:04+00:00
qml: make use of ControlBar.background

- - - - -
c038375a by Fatih Uzunoglu at 2023-06-23T05:01:04+00:00
qml: use anchors for control bar animation

- - - - -


4 changed files:

- modules/gui/qt/maininterface/qml/MainDisplay.qml
- modules/gui/qt/player/qml/ControlBar.qml
- modules/gui/qt/player/qml/MiniPlayer.qml
- modules/gui/qt/player/qml/Player.qml


Changes:

=====================================
modules/gui/qt/maininterface/qml/MainDisplay.qml
=====================================
@@ -47,8 +47,7 @@ FocusScope {
     property bool hasMiniPlayer: miniPlayer.visible
 
     // NOTE: The main view must be above the indexing bar and the mini player.
-    property int displayMargin: (loaderProgress.active) ? miniPlayer.height + loaderProgress.height
-                                                        : miniPlayer.height
+    property real displayMargin: (height - miniPlayer.y) + (loaderProgress.active ? loaderProgress.height : 0)
 
     readonly property int positionSliderY: {
         var size = miniPlayer.y + miniPlayer.sliderY
@@ -59,7 +58,6 @@ FocusScope {
             return size
     }
 
-    property bool _inhibitMiniPlayer: false
     property bool _showMiniPlayer: false
     property var _oldViewProperties: ({}) // saves last state of the views
 
@@ -195,7 +193,6 @@ FocusScope {
 
 
     function showPlayer() {
-        g_mainDisplay._inhibitMiniPlayer = true
         History.push(["player"])
     }
 
@@ -248,13 +245,7 @@ FocusScope {
                 tint: frostedTheme.bg.secondary
 
                 effectRect: {
-                    let _height = 0
-                    if (loaderProgress.active && loaderProgress.item.visible)
-                        _height += loaderProgress.item.height
-                    if (miniPlayer.visible)
-                        _height += miniPlayer.height
-
-                    return Qt.rect(0, height - _height, width, _height)
+                    return Qt.rect(0, loaderProgress.y, width, height -  loaderProgress.y)
                 }
             }
 
@@ -484,6 +475,8 @@ FocusScope {
 
             active: (MainCtx.mediaLibraryAvailable && MainCtx.mediaLibrary.idle === false)
 
+            height: active ? implicitHeight : 0
+
             source: "qrc:///widgets/ScanProgressBar.qml"
 
             onLoaded: {
@@ -507,8 +500,8 @@ FocusScope {
             width: VLCStyle.dp(320, VLCStyle.scale)
             height: VLCStyle.dp(180, VLCStyle.scale)
             z: 2
-            visible: !g_mainDisplay._inhibitMiniPlayer && g_mainDisplay._showMiniPlayer && MainCtx.hasEmbededVideo
-            enabled: !g_mainDisplay._inhibitMiniPlayer && g_mainDisplay._showMiniPlayer && MainCtx.hasEmbededVideo
+            visible: g_mainDisplay._showMiniPlayer && MainCtx.hasEmbededVideo
+            enabled: g_mainDisplay._showMiniPlayer && MainCtx.hasEmbededVideo
 
             dragXMin: 0
             dragXMax: g_mainDisplay.width - playerPip.width
@@ -543,11 +536,6 @@ FocusScope {
         P.MiniPlayer {
             id: miniPlayer
 
-            BindingCompat on state {
-                when: g_mainDisplay._inhibitMiniPlayer && !miniPlayer.visible
-                value: ""
-            }
-
             anchors.left: parent.left
             anchors.right: parent.right
             anchors.bottom: parent.bottom
@@ -555,7 +543,7 @@ FocusScope {
             z: 3
 
             horizontalPadding: VLCStyle.applicationHorizontalMargin
-            bottomPadding: VLCStyle.applicationVerticalMargin
+            bottomPadding: VLCStyle.applicationVerticalMargin + VLCStyle.margin_xsmall
 
             background.visible: !parentRectangle.layer.enabled
 


=====================================
modules/gui/qt/player/qml/ControlBar.qml
=====================================
@@ -23,13 +23,14 @@ import QtQuick.Layouts 1.12
 import QtQml.Models 2.12
 
 import org.videolan.vlc 0.1
+import org.videolan.compat 0.1
 
 import "qrc:///style/"
 import "qrc:///widgets/" as Widgets
 import "qrc:///playlist/" as PL
 
 
-Control {
+T.Pane {
     id: root
 
     enum TimeTextPosition {
@@ -38,6 +39,18 @@ Control {
         LeftRightSlider
     }
 
+    implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+                            contentWidth + leftPadding + rightPadding)
+    implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+                             contentHeight + topPadding + bottomPadding)
+
+    bottomPadding: VLCStyle.margin_xsmall
+
+    BindingCompat on topInset {
+        delayed: true
+        value: row2.y
+    }
+
     readonly property alias sliderY: row2.y
     property int textPosition: ControlBar.TimeTextPosition.AboveSlider
     property alias identifier: playerControlLayout.identifier
@@ -56,16 +69,6 @@ Control {
 
     Accessible.name: I18n.qtr("Player controls")
 
-    onActiveFocusChanged: if (activeFocus) trackPositionSlider.forceActiveFocus(focusReason)
-
-    Component.onCompleted: {
-        // if initially textPosition = Hide, then _onTextPositionChanged isn't called
-        if (textPosition === ControlBar.TimeTextPosition.Hide)
-            _layout()
-    }
-
-    onTextPositionChanged: _layout()
-
     function showChapterMarks() {
         trackPositionSlider.showChapterMarks()
     }
@@ -90,85 +93,80 @@ Control {
             menu.close()
     }
 
-    function _layout() {
-        switch (textPosition) {
-            case ControlBar.TimeTextPosition.Hide:
-                row1.children = []
-                row2.children = [trackPositionSlider]
-                mediaTime.visible = false
-                mediaRemainingTime.visible = false
-                spacer.visible = false
-                row2.Layout.leftMargin = 0
-                row2.Layout.rightMargin = 0
-                mediaTime.font.pixelSize = Qt.binding(function() { return VLCStyle.fontSize_normal })
-                mediaRemainingTime.font.pixelSize = Qt.binding(function() { return VLCStyle.fontSize_normal })
-                break;
-
-            case ControlBar.TimeTextPosition.AboveSlider:
-                row1.children = [mediaTime, spacer, mediaRemainingTime]
-                row2.children = [trackPositionSlider]
-                mediaTime.visible = true
-                mediaRemainingTime.visible = Qt.binding(function() { return !playlistVisibility.isPlaylistVisible })
-                spacer.visible = true
-                row2.Layout.leftMargin = 0
-                row2.Layout.rightMargin = 0
-                mediaTime.font.pixelSize = Qt.binding(function() { return VLCStyle.fontSize_normal })
-                mediaRemainingTime.font.pixelSize = Qt.binding(function() { return VLCStyle.fontSize_normal })
-                break;
-
-            case ControlBar.TimeTextPosition.LeftRightSlider:
-                row1.children = []
-                row2.children = [mediaTime, trackPositionSlider, mediaRemainingTime]
-                mediaTime.visible = true
-                mediaRemainingTime.visible = true
-                spacer.visible = false
-                row2.Layout.leftMargin = VLCStyle.margin_xsmall
-                row2.Layout.rightMargin = VLCStyle.margin_xsmall
-                mediaTime.font.pixelSize = Qt.binding(function() { return VLCStyle.fontSize_small })
-                mediaRemainingTime.font.pixelSize = Qt.binding(function() { return VLCStyle.fontSize_small })
-                trackPositionSlider.Layout.alignment = Qt.AlignVCenter
-                break;
-
-            default:
-                console.assert(false, "invalid text position")
-        }
-
-        row1.visible = row1.children.length > 0
-        row2.visible = row2.children.length > 0
-    }
-
     readonly property ColorContext colorContext: ColorContext {
         id: theme
         colorSet: ColorContext.Window
     }
 
+    background: Rectangle {
+        color: theme.bg.primary
+    }
+
     contentItem: ColumnLayout {
         spacing: VLCStyle.margin_xsmall
-        z: 1
 
-        RowLayout {
-            id: row1
+        Item {
+            // BUG: RowLayout can not be used here
+            // because of a Qt bug. (Height is
+            // incorrectly determined. Could be
+            // about nested layouting).
 
-            spacing: 0
+            id: pseudoRow
             Layout.fillWidth: true
+            Layout.fillHeight: false
             Layout.leftMargin: VLCStyle.margin_normal
             Layout.rightMargin: VLCStyle.margin_normal
+
+            implicitHeight: visible ? Math.max(mediaTime.implicitHeight, mediaRemainingTime.implicitHeight) : 0
+
+            visible: children.length > 0
+
+            children: {
+                switch (textPosition) {
+                case ControlBar.TimeTextPosition.AboveSlider:
+                    return [mediaTime, mediaRemainingTime]
+                case ControlBar.TimeTextPosition.Hide:
+                case ControlBar.TimeTextPosition.LeftRightSlider:
+                default:
+                    return []
+                }
+            }
         }
 
         RowLayout {
             id: row2
 
+            children: {
+                switch (textPosition) {
+                case ControlBar.TimeTextPosition.Hide:
+                case ControlBar.TimeTextPosition.AboveSlider:
+                    return [trackPositionSlider]
+                case ControlBar.TimeTextPosition.LeftRightSlider:
+                    return [mediaTime, trackPositionSlider, mediaRemainingTime]
+                default:
+                    return []
+                }
+            }
+
+            visible: children.length > 0
+
             spacing: VLCStyle.margin_xsmall
+
             Layout.fillWidth: true
+            Layout.fillHeight: false
+            Layout.leftMargin: (textPosition === ControlBar.TimeTextPosition.LeftRightSlider) ? VLCStyle.margin_xsmall
+                                                                                              : 0
+
+            Layout.rightMargin: Layout.leftMargin
         }
 
         PlayerControlLayout {
             id: playerControlLayout
 
             Layout.fillWidth: true
+            Layout.fillHeight: true
             Layout.leftMargin: VLCStyle.margin_large
             Layout.rightMargin: VLCStyle.margin_large
-            Layout.bottomMargin: VLCStyle.margin_xsmall
 
             Navigation.upItem: trackPositionSlider.enabled ? trackPositionSlider : root.Navigation.upItem
 
@@ -178,64 +176,68 @@ Control {
         }
     }
 
-    T.Label {
-        id: mediaTime
-
-        text: Player.time.formatHMS()
-        color: theme.fg.primary
-    }
-
-    T.Label {
-        id: mediaRemainingTime
-
-        text: (MainCtx.showRemainingTime && Player.remainingTime.valid())
-              ? "-" + Player.remainingTime.formatHMS()
-              : Player.length.formatHMS()
-        color: theme.fg.primary
-
-        MouseArea {
-            anchors.fill: parent
-            onClicked: MainCtx.showRemainingTime = !MainCtx.showRemainingTime
-        }
-    }
-
-    Item {
-        id: spacer
-
-        Layout.fillWidth: true
-    }
-
-    SliderBar {
-        id: trackPositionSlider
-
-        barHeight: VLCStyle.heightBar_xxsmall
-        Layout.fillWidth: true
-        enabled: Player.playingState === Player.PLAYING_STATE_PLAYING || Player.playingState === Player.PLAYING_STATE_PAUSED
+    readonly property list<Item> strayItems: [
+        T.Label {
+            id: mediaTime
+            text: Player.time.formatHMS()
+            color: theme.fg.primary
+            font.pixelSize: (textPosition === ControlBar.TimeTextPosition.LeftRightSlider) ? VLCStyle.fontSize_small
+                                                                                           : VLCStyle.fontSize_normal
+
+            anchors.left: (parent === pseudoRow) ? parent.left : undefined
+            anchors.verticalCenter: (parent === pseudoRow) ? parent.verticalCenter : undefined
+        },
+        T.Label {
+            id: mediaRemainingTime
+
+            text: (MainCtx.showRemainingTime && Player.remainingTime.valid())
+                  ? "-" + Player.remainingTime.formatHMS()
+                  : Player.length.formatHMS()
+            color: mediaTime.color
+            font.pixelSize: mediaTime.font.pixelSize
+
+            anchors.right: (parent === pseudoRow) ? parent.right : undefined
+            anchors.verticalCenter: (parent === pseudoRow) ? parent.verticalCenter : undefined
+
+            MouseArea {
+                anchors.fill: parent
+                onClicked: MainCtx.showRemainingTime = !MainCtx.showRemainingTime
+            }
+        },
+        SliderBar {
+            id: trackPositionSlider
+
+            barHeight: VLCStyle.heightBar_xxsmall
+            Layout.fillWidth: true
+            enabled: Player.playingState === Player.PLAYING_STATE_PLAYING || Player.playingState === Player.PLAYING_STATE_PAUSED
 
-        Navigation.parentItem: root
-        Navigation.downItem: playerControlLayout
+            Navigation.parentItem: root
+            Navigation.downItem: playerControlLayout
 
-        activeFocusOnTab: true
+            activeFocusOnTab: true
 
-        Keys.onPressed: {
-            Navigation.defaultKeyAction(event)
-        }
-    }
+            focus: true
 
-    Loader {
-        id: bookmarksLoader
+            Keys.onPressed: {
+                Navigation.defaultKeyAction(event)
+            }
+        },
+        Loader {
+            id: bookmarksLoader
 
-        active: MainCtx.mediaLibraryAvailable
-        source: "qrc:/player/Bookmarks.qml"
+            parent: root
+            active: MainCtx.mediaLibraryAvailable
+            source: "qrc:/player/Bookmarks.qml"
 
-        x: root.leftPadding + trackPositionSlider.x + row2.Layout.leftMargin
-        y: row2.y + row2.height + VLCStyle.margin_xxsmall
-        width: trackPositionSlider.width
+            x: root.leftPadding + trackPositionSlider.x + row2.Layout.leftMargin
+            y: row2.y + row2.height + VLCStyle.margin_xxsmall
+            width: trackPositionSlider.width
 
-        onLoaded: {
-           item.barHeight = Qt.binding(function() { return bookmarksHeight })
-           item.controlBarHovered = Qt.binding(function() { return root.hovered })
-           item.yShift = Qt.binding(function() { return row2.height + VLCStyle.margin_xxsmall })
+            onLoaded: {
+               item.barHeight = Qt.binding(function() { return bookmarksHeight })
+               item.controlBarHovered = Qt.binding(function() { return root.hovered })
+               item.yShift = Qt.binding(function() { return row2.height + VLCStyle.margin_xxsmall })
+            }
         }
-    }
+    ]
 }


=====================================
modules/gui/qt/player/qml/MiniPlayer.qml
=====================================
@@ -16,100 +16,62 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 import QtQuick 2.12
-import QtQuick.Controls 2.12
-import QtQuick.Templates 2.12 as T
-import QtQuick.Layouts 1.12
-import QtGraphicalEffects 1.12
 
 import org.videolan.vlc 0.1
+import org.videolan.compat 0.1
 
-import "qrc:///widgets/" as Widgets
 import "qrc:///style/"
 
-T.Pane {
+ControlBar {
     id: root
 
-    readonly property alias sliderY: controlBar.sliderY
-
-    height: 0
+    // Binding evaluation order:
+    // state -> implicitHeight OR visible -> anchors.bottomMargin
+    // Care must be taken to not cause binding loops.
+    visible: {
+        if (state === "inViewport")
+            return true
+        else if ((anchors.bottomMargin + implicitHeight) > Number.EPSILON)
+            return true
+        else
+            return false
+    }
 
-    implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
-                            implicitContentWidth + leftPadding + rightPadding)
-    implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
-                             implicitContentHeight + topPadding + bottomPadding)
+    state: (Player.playingState === Player.PLAYING_STATE_STOPPED) ? "outViewport"
+                                                                  : "inViewport"
 
-    visible: false
+    textPosition: (MainCtx.pinVideoControls) ? ControlBar.TimeTextPosition.LeftRightSlider
+                                             : ControlBar.TimeTextPosition.Hide
 
-    state: (Player.playingState === Player.PLAYING_STATE_STOPPED) ? ""
-                                                                  : "expanded"
+    sliderHeight: (MainCtx.pinVideoControls) ? VLCStyle.heightBar_xxsmall
+                                             : VLCStyle.dp(3, VLCStyle.scale)
 
-    //redundant with child ControlBar
-    Accessible.ignored: true
+    bookmarksHeight: (MainCtx.pinVideoControls) ? VLCStyle.controlBarBookmarksHeight
+                                                : VLCStyle.icon_xsmall * 0.7
 
-    states: State {
-        name: "expanded"
+    identifier: PlayerControlbarModel.Miniplayer
 
-        PropertyChanges {
-            target: root
-            visible: true
-            height: implicitHeight
-        }
+    Component.onCompleted: {
+        // Enable the behavior only when everything is resolved:
+        Qt.callLater(() => { behavior.enabled = true })
     }
 
-    transitions: Transition {
-        from: ""; to: "expanded"
-        reversible: true
+    BindingCompat on anchors.bottomMargin {
+        id: binding
 
-        SequentialAnimation {
-            // visible should change first, in order for inner layouts to calculate implicitHeight correctly
-            PropertyAction { property: "visible" }
-            NumberAnimation { property: "height"; easing.type: Easing.InOutSine; duration: VLCStyle.duration_long; }
-        }
-    }
-
-    readonly property ColorContext colorContext: ColorContext {
-        id: theme
-        colorSet: ColorContext.Window
-    }
+        // eliminate intermediate adjustments until implicit height is calculated fully
+        // we can not delay on component load because we do not want twitching
+        // NOTE: The delay here can be removed, as long as a direct height is set
+        //       for the whole control instead of implicit height.
+        delayed: behavior.enabled
 
-    // this MouseArea prevents mouse events to be sent below miniplayer
-    MouseArea {
-        anchors.fill: parent
-        hoverEnabled: true
-        acceptedButtons: Qt.AllButtons
+        value: (root.state === "outViewport") ? -root.implicitHeight : 0
     }
 
-    background: Rectangle {
-        color: theme.bg.primary
-    }
-
-    contentItem: ControlBar {
-        id: controlBar
-
-        focus: true
-
-        // NOTE: When controls are pinned we keep the same slider in both views. Otherwise we make
-        //       it more compact to fit the modern design.
-
-        textPosition: (MainCtx.pinVideoControls) ? ControlBar.TimeTextPosition.LeftRightSlider
-                                                 : ControlBar.TimeTextPosition.Hide
-
-        sliderHeight: (MainCtx.pinVideoControls) ? VLCStyle.heightBar_xxsmall
-                                                 : VLCStyle.dp(3, VLCStyle.scale)
-
-        bookmarksHeight: (MainCtx.pinVideoControls) ? VLCStyle.controlBarBookmarksHeight
-                                                    : VLCStyle.icon_xsmall * 0.7
-
-        identifier: PlayerControlbarModel.Miniplayer
-
-        Navigation.parentItem: root
-
-        Keys.onPressed: {
-            Navigation.defaultKeyAction(event)
-
-            if (!event.accepted) {
-                MainCtx.sendHotkey(event.key, event.modifiers)
-            }
-        }
+    Behavior on anchors.bottomMargin {
+        id: behavior
+        enabled: false
+        NumberAnimation { easing.type: Easing.InOutSine; duration: VLCStyle.duration_long; }
     }
 }
+


=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -216,19 +216,6 @@ FocusScope {
         }
     }
 
-    // Backgrounds of topControlbar and controlBar are drawn separately since they can outgrow their content
-    Component {
-        id: backgroundForPinnedControls
-
-        Rectangle {
-            width: rootPlayer.width
-
-            opacity: MainCtx.pinOpacity
-
-            color: windowTheme.bg.primary
-        }
-    }
-
     Component {
         id: acrylicBackground
 
@@ -281,49 +268,22 @@ FocusScope {
         }
     }
 
-    /* bottom control bar background */
-    Widgets.LoaderFade {
+    Rectangle {
         anchors.bottom: controlBarView.bottom
         anchors.left: controlBarView.left
         anchors.right: controlBarView.right
 
-        height: item.height
-
-        state: controlBarView.state
-
-        sourceComponent: (MainCtx.pinVideoControls)
-                         ? backgroundForPinnedControls
-                         : (rootPlayer.hasEmbededVideo ? forVideoMedia : forMusicMedia)
-
-        onItemChanged: {
-            if (rootPlayer._controlsUnderVideo)
-                item.height = Qt.binding(function () { return rootPlayer.height - rootPlayer.positionSliderY; })
-        }
+        implicitHeight: VLCStyle.dp(206, VLCStyle.scale)
 
-        Component {
-            id: forVideoMedia
+        opacity: controlBarView.opacity
 
-            Rectangle {
-                width: rootPlayer.width
-                height: VLCStyle.dp(206, VLCStyle.scale)
-                gradient: Gradient {
-                    GradientStop { position: 0; color: "transparent" }
-                    GradientStop { position: .64; color: Qt.rgba(0, 0, 0, .8) }
-                    GradientStop { position: 1; color: "black" }
-                }
-            }
+        gradient: Gradient {
+            GradientStop { position: 0; color: "transparent" }
+            GradientStop { position: .64; color: Qt.rgba(0, 0, 0, .8) }
+            GradientStop { position: 1; color: "black" }
         }
 
-        Component {
-            id: forMusicMedia
-
-            Rectangle {
-                width: controlBarView.width
-                height: controlBarView.height - (rootPlayer.positionSliderY - controlBarView.y)
-                color: windowTheme.bg.primary
-                opacity: 0.7
-            }
-        }
+        visible: (controlBarView.item ? !controlBarView.item.background.visible : true)
     }
 
     Widgets.LoaderFade {
@@ -656,41 +616,37 @@ FocusScope {
                 item.showChapterMarks()
         }
 
-        sourceComponent: MouseArea {
-            id: controllerMouseArea
+        sourceComponent: ControlBar {
+            hoverEnabled: true
 
-            readonly property alias sliderY: controllerId.sliderY
+            focus: true
 
-            height: controllerId.implicitHeight + controllerId.anchors.bottomMargin
-            width: controlBarView.width
-            hoverEnabled: true
+            rightPadding: VLCStyle.applicationHorizontalMargin
+            leftPadding: VLCStyle.applicationHorizontalMargin
+            bottomPadding: VLCStyle.applicationVerticalMargin + VLCStyle.margin_xsmall
 
-            function showChapterMarks() {
-                controllerId.showChapterMarks()
-            }
+            textPosition: (MainCtx.pinVideoControls)
+                          ? ControlBar.TimeTextPosition.LeftRightSlider
+                          : ControlBar.TimeTextPosition.AboveSlider
+
+            Navigation.parentItem: rootPlayer
+            Navigation.upItem: playlistpopup.showPlaylist ? playlistpopup : (audioControls.visible ? audioControls : topcontrolView)
 
-            onContainsMouseChanged: rootPlayer.lockUnlockAutoHide(containsMouse)
+            onRequestLockUnlockAutoHide: rootPlayer.lockUnlockAutoHide(lock)
 
-            ControlBar {
-                id: controllerId
+            identifier: (Player.hasVideoOutput) ? PlayerControlbarModel.Videoplayer
+                                                : PlayerControlbarModel.Audioplayer
 
-                focus: true
-                anchors.fill: parent
-                anchors.leftMargin: VLCStyle.applicationHorizontalMargin
-                anchors.rightMargin: VLCStyle.applicationHorizontalMargin
-                anchors.bottomMargin: VLCStyle.applicationVerticalMargin
+            onHoveredChanged: rootPlayer.lockUnlockAutoHide(hovered)
 
-                textPosition: (MainCtx.pinVideoControls)
-                              ? ControlBar.TimeTextPosition.LeftRightSlider
-                              : ControlBar.TimeTextPosition.AboveSlider
+            background: Rectangle {
+                id: controlBarBackground
 
-                Navigation.parentItem: rootPlayer
-                Navigation.upItem: playlistpopup.showPlaylist ? playlistpopup : (audioControls.visible ? audioControls : topcontrolView)
+                visible: !MainCtx.hasEmbededVideo
 
-                onRequestLockUnlockAutoHide: rootPlayer.lockUnlockAutoHide(lock)
+                opacity: MainCtx.pinVideoControls ? MainCtx.pinOpacity : 0.7
 
-                identifier: (Player.hasVideoOutput) ? PlayerControlbarModel.Videoplayer
-                                                    : PlayerControlbarModel.Audioplayer
+                color: windowTheme.bg.primary
             }
         }
     }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/963a01e57fbe3ca5fa36f13e248ae2a225c24e50...c038375a31054a47c86cb90401fb7af7d1bffb8b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/963a01e57fbe3ca5fa36f13e248ae2a225c24e50...c038375a31054a47c86cb90401fb7af7d1bffb8b
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