[vlc-devel] [PATCH 18/38] qml: make MiniPlayer layout-independent in MainDisplay
Fatih Uzunoglu
fuzun54 at outlook.com
Thu Aug 20 19:55:27 CEST 2020
---
.../gui/qt/medialibrary/qml/MainDisplay.qml | 29 +++++++++++--------
modules/gui/qt/player/qml/MiniPlayer.qml | 9 ++++--
2 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/modules/gui/qt/medialibrary/qml/MainDisplay.qml b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
index cfd6f12189..c5753a813f 100644
--- a/modules/gui/qt/medialibrary/qml/MainDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
@@ -221,12 +221,13 @@ Widgets.NavigableFocusScope {
anchors {
top: parent.top
right: parent.right
- bottom: parent.bottom
}
width: root.width / __widthFactor
visible: false
focus: false
+ height: parent.height - miniPlayer.implicitHeight
+
property bool expanded: mainInterface.playlistDocked && mainInterface.playlistVisible
property double __widthFactor : mainInterface.playlistWidthFactor ? mainInterface.playlistWidthFactor : 4.0
property int __newWidth : root.width / __widthFactor
@@ -393,20 +394,24 @@ Widgets.NavigableFocusScope {
}
}
}
+ }
- Player.MiniPlayer {
- id: miniPlayer
- z: 2
- navigationParent: medialibId
- navigationUpItem: stackView
- navigationCancelItem:sourcesBanner
- onExpandedChanged: {
- if (!expanded && miniPlayer.activeFocus)
- stackView.forceActiveFocus()
- }
+ Player.MiniPlayer {
+ id: miniPlayer
+
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+
+ z: 2
+ navigationParent: medialibId
+ navigationUpItem: stackView
+ navigationCancelItem:sourcesBanner
+ onExpandedChanged: {
+ if (!expanded && miniPlayer.activeFocus)
+ stackView.forceActiveFocus()
}
}
}
-
}
}
diff --git a/modules/gui/qt/player/qml/MiniPlayer.qml b/modules/gui/qt/player/qml/MiniPlayer.qml
index ac2525d93b..c022f9a0a5 100644
--- a/modules/gui/qt/player/qml/MiniPlayer.qml
+++ b/modules/gui/qt/player/qml/MiniPlayer.qml
@@ -13,8 +13,6 @@ Widgets.NavigableFocusScope {
id: root
- Layout.fillWidth: true
-
readonly property bool expanded: root.implicitHeight === root.childrenRect.height
Component.onCompleted : {
@@ -52,6 +50,13 @@ Widgets.NavigableFocusScope {
to: 0
}
+ // this MouseArea prevents mouse events to be sent below miniplayer
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ acceptedButtons: Qt.AllButtons
+ }
+
Column {
anchors.left: parent.left
anchors.right: parent.right
--
2.25.1
More information about the vlc-devel
mailing list