From 06071fd14d6cff4d3f9b3cdff92f5ddf4bf2b3bc Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 19 Apr 2018 07:20:09 +0200 Subject: GroupBox: add implicitLabelWidth|Height [ChangeLog][Controls][GroupBox] Added implicitLabelWidth and implicitLabelHeight properties. Change-Id: Ieae54a3b3044b306cd00f45101c6573b5291352d Reviewed-by: Mitch Curtis --- src/imports/controls/imagine/GroupBox.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/imports/controls/imagine') diff --git a/src/imports/controls/imagine/GroupBox.qml b/src/imports/controls/imagine/GroupBox.qml index d18af5ba..af6e2376 100644 --- a/src/imports/controls/imagine/GroupBox.qml +++ b/src/imports/controls/imagine/GroupBox.qml @@ -44,11 +44,11 @@ T.GroupBox { id: control implicitWidth: Math.max(implicitBackgroundWidth, - label ? label.implicitWidth + leftPadding + rightPadding : 0, + implicitLabelWidth + leftPadding + rightPadding, contentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight, contentHeight + topPadding + bottomPadding) - topPadding: (background ? background.topPadding : 0) + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0) + topPadding: (background ? background.topPadding : 0) + (implicitLabelWidth > 0 ? implicitLabelHeight + spacing : 0) leftPadding: background ? background.leftPadding : 0 rightPadding: background ? background.rightPadding : 0 bottomPadding: background ? background.bottomPadding : 0 -- cgit v1.2.3