[vlc-commits] qml: add parentWindow property to ControlButtons
Fatih Uzunoglu
git at videolan.org
Thu Aug 27 12:45:08 CEST 2020
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Mon Aug 10 17:17:21 2020 +0300| [27d9e66e2690bc98c0257aec5e18adcf5a9a4c38] | committer: Pierre Lamot
qml: add parentWindow property to ControlButtons
this makes adaptation easier for a future detachment possibility
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=27d9e66e2690bc98c0257aec5e18adcf5a9a4c38
---
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: {
More information about the vlc-commits
mailing list