diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-05-28 10:19:30 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-29 12:36:35 +0200 |
commit | 6e62a72c72abc5ad6e241541208a36378d448853 (patch) | |
tree | 67aaf7f9ed7d941fb760b5852df1f4e5f10efb46 /src/controls/GroupBox.qml | |
parent | a48849649e9d534449f6feb685dbb708f354d270 (diff) | |
download | qtquickcontrols-6e62a72c72abc5ad6e241541208a36378d448853.tar.gz |
Improved size calculation of GroupBox
This adds some pixel tweaks on mac, adds minimum
size to fit the label and fixes dpi scaling on Windows
Change-Id: I4c43ba4a7815be87356336a9dafc1a217437940b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/controls/GroupBox.qml')
-rw-r--r-- | src/controls/GroupBox.qml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/controls/GroupBox.qml b/src/controls/GroupBox.qml index 9bf1c0cc..4aa6a50f 100644 --- a/src/controls/GroupBox.qml +++ b/src/controls/GroupBox.qml @@ -159,7 +159,8 @@ Item { /*! \internal */ property alias __style: styleLoader.item - implicitWidth: (!anchors.fill ? container.calcWidth() : 0) + loader.leftMargin + loader.rightMargin + implicitWidth: Math.max((!anchors.fill ? container.calcWidth() : 0) + loader.leftMargin + loader.rightMargin, + sizeHint.implicitWidth + (checkable ? 24 : 6)) implicitHeight: (!anchors.fill ? container.calcHeight() : 0) + loader.topMargin + loader.bottomMargin Layout.minimumWidth: implicitWidth @@ -181,6 +182,7 @@ Item { property int rightMargin: __style ? __style.padding.right : 0 sourceComponent: styleLoader.item ? styleLoader.item.panel : null onLoaded: item.z = -1 + Text { id: sizeHint ; visible: false ; text: title } Loader { id: styleLoader property alias __control: groupbox |