[vlc-devel] [PATCH 2/4] qml: fix binding loop on width in modal dialogs

Pierre Lamot pierre at videolabs.io
Thu Feb 6 14:10:13 CET 2020


---
 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
-- 
2.17.1



More information about the vlc-devel mailing list