[vlc-commits] [Git][videolan/vlc][master] qml: use top and bottom padding in player specialization loader

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Nov 29 10:08:57 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
45ec033f by Fatih Uzunoglu at 2024-11-29T09:52:06+00:00
qml: use top and bottom padding in player specialization loader

We want the loaded item to cover the whole area in certain cases,
but we don't want actual content to be placed behind the top bar
or the control bar. Only the background should go behind the top
and control bars.

- - - - -


1 changed file:

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


Changes:

=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -176,6 +176,10 @@ FocusScope {
 
         property int cursorShape
 
+        // Have padding here, so that the content (unlike background) does not go behind the top bar or the control bar:
+        property real topPadding: (anchors.top === parent.top) ? topBar.height : 0
+        property real bottomPadding: (anchors.bottom === parent.bottom) ? controlBar.height : 0
+
         Component {
             id: videoComponent
 
@@ -253,10 +257,14 @@ FocusScope {
             id: audioComponent
 
             FocusScope {
+                id: audioFocusScope
                 // Audio
 
                 focus: true
 
+                property real topPadding: playerSpecializationLoader.topPadding
+                property real bottomPadding: playerSpecializationLoader.bottomPadding
+
                 // background image
                 Rectangle {
                     focus: false
@@ -294,8 +302,8 @@ FocusScope {
                     }
 
                     anchors.fill: parent
-                    anchors.topMargin: VLCStyle.margin_xsmall
-                    anchors.bottomMargin: VLCStyle.margin_xsmall
+                    anchors.topMargin: VLCStyle.margin_xsmall + audioFocusScope.topPadding
+                    anchors.bottomMargin: VLCStyle.margin_xsmall + audioFocusScope.bottomPadding
 
                     onWheel: (wheel) => {
                         wheel.accepted = true



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/45ec033f434169e854dc3ece05fbbcf3c9009156

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/45ec033f434169e854dc3ece05fbbcf3c9009156
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