[vlc-commits] qml: fix binding loop on width in modal dialogs

Pierre Lamot git at videolan.org
Thu Feb 13 11:09:43 CET 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Tue Feb  4 13:44:12 2020 +0100| [63c3345a201675067d27048e9a0a54156047d324] | committer: Jean-Baptiste Kempf

qml: fix binding loop on width in modal dialogs

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=63c3345a201675067d27048e9a0a54156047d324
---

 modules/gui/qt/dialogs/dialogs/qml/ModalDialog.qml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/gui/qt/dialogs/dialogs/qml/ModalDialog.qml b/modules/gui/qt/dialogs/dialogs/qml/ModalDialog.qml
index 33294cb091..b7caa9be2c 100644
--- a/modules/gui/qt/dialogs/dialogs/qml/ModalDialog.qml
+++ b/modules/gui/qt/dialogs/dialogs/qml/ModalDialog.qml
@@ -36,6 +36,11 @@ Dialog {
     padding: VLCStyle.margin_normal
     margins: VLCStyle.margin_large
 
+    implicitWidth: contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0
+    implicitHeight: (header && header.visible ? header.implicitHeight + spacing : 0)
+                    + (footer && footer.visible ? footer.implicitHeight + spacing : 0)
+                    + (contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0)
+
     Overlay.modal: GaussianBlur {
         source: ShaderEffectSource {
             sourceItem: control.rootWindow



More information about the vlc-commits mailing list