[vlc-devel] [PATCH 36/38] qml: add parentWindow property to ControlButtons
Fatih Uzunoglu
fuzun54 at outlook.com
Thu Aug 20 19:55:45 CEST 2020
this makes adaptation easier for a future detachment possibility
---
modules/gui/qt/player/qml/ControlBar.qml | 2 ++
modules/gui/qt/player/qml/ControlButtons.qml | 5 ++++-
modules/gui/qt/player/qml/MiniPlayer.qml | 1 +
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/player/qml/ControlBar.qml b/modules/gui/qt/player/qml/ControlBar.qml
index cbe6da9698..2646204154 100644
--- a/modules/gui/qt/player/qml/ControlBar.qml
+++ b/modules/gui/qt/player/qml/ControlBar.qml
@@ -129,6 +129,8 @@ Widgets.NavigableFocusScope {
ControlButtons{
id:controlmodelbuttons
+
+ parentWindow: mainInterfaceRect
}
}
diff --git a/modules/gui/qt/player/qml/ControlButtons.qml b/modules/gui/qt/player/qml/ControlButtons.qml
index 33b6e375a6..d3cfcffff1 100644
--- a/modules/gui/qt/player/qml/ControlButtons.qml
+++ b/modules/gui/qt/player/qml/ControlButtons.qml
@@ -28,7 +28,10 @@ import "qrc:///menus/" as Menus
import "qrc:///style/"
Item{
+ id: controlButtons
+
property bool isMiniplayer: false
+ property var parentWindow: undefined
property var buttonL: [
{ id: PlayerControlBarModel.PLAY_BUTTON, label: VLCIcons.play, text: i18n.qtr("Play")},
@@ -811,7 +814,7 @@ Item{
Component{
id: volumeBtnDelegate
- VolumeWidget{}
+ VolumeWidget { parentWindow: controlButtons.parentWindow }
}
Component {
diff --git a/modules/gui/qt/player/qml/MiniPlayer.qml b/modules/gui/qt/player/qml/MiniPlayer.qml
index 84d1f34dbd..4eadaf4926 100644
--- a/modules/gui/qt/player/qml/MiniPlayer.qml
+++ b/modules/gui/qt/player/qml/MiniPlayer.qml
@@ -235,6 +235,7 @@ Widgets.NavigableFocusScope {
id: controlmodelbuttons
isMiniplayer: true
+ parentWindow: mainInterfaceRect
}
Keys.onPressed: {
--
2.25.1
More information about the vlc-devel
mailing list