From c2fd8f7d00e2a47724765e289b828c36c98da29c Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 5 Apr 2017 19:53:01 +0200 Subject: DialogButtonBox: add contentWidth and contentHeight This is a follow-up to f1f884d3, which mentioned that: This can be fixed properly in dev by providing separate contentWidth and contentHeight properties that cleanly propagate the content size to QML. [ChangeLog][Controls][DialogButtonBox] Added contentWidth and contentHeight properties. Change-Id: I4b53702568c55d666bccb587af9fe8c8eba0b63d Reviewed-by: Mitch Curtis --- src/imports/controls/imagine/DialogButtonBox.qml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/imports/controls/imagine') diff --git a/src/imports/controls/imagine/DialogButtonBox.qml b/src/imports/controls/imagine/DialogButtonBox.qml index eb756548..e58d5645 100644 --- a/src/imports/controls/imagine/DialogButtonBox.qml +++ b/src/imports/controls/imagine/DialogButtonBox.qml @@ -44,9 +44,9 @@ T.DialogButtonBox { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, - contentItem.implicitWidth + leftPadding + rightPadding) + (control.count === 1 ? contentWidth * 2 : contentWidth) + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, - contentItem.implicitHeight + topPadding + bottomPadding) + contentHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 leftPadding: background ? background.leftPadding : 0 @@ -60,9 +60,6 @@ T.DialogButtonBox { } contentItem: ListView { - implicitWidth: control.count === 1 ? 200 : contentWidth - implicitHeight: 32 - model: control.contentModel spacing: control.spacing orientation: ListView.Horizontal -- cgit v1.2.3