diff options
Diffstat (limited to 'src/imports/controls/GroupBox.qml')
-rw-r--r-- | src/imports/controls/GroupBox.qml | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/imports/controls/GroupBox.qml b/src/imports/controls/GroupBox.qml index 2985c02e..e16148bc 100644 --- a/src/imports/controls/GroupBox.qml +++ b/src/imports/controls/GroupBox.qml @@ -34,25 +34,23 @@ ** ****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 -import QtQuick.Controls.impl 2.4 -import QtQuick.Templates 2.4 as T +import QtQuick 2.12 +import QtQuick.Controls 2.5 +import QtQuick.Controls.impl 2.5 +import QtQuick.Templates 2.5 as T T.GroupBox { id: control - implicitWidth: Math.max(background ? background.implicitWidth : 0, - label ? label.implicitWidth + leftPadding + rightPadding : 0, - contentWidth + leftPadding + rightPadding) - implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) - - contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) - contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + contentWidth + leftPadding + rightPadding, + implicitLabelWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + contentHeight + topPadding + bottomPadding) spacing: 6 padding: 12 - topPadding: padding + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0) + topPadding: padding + (implicitLabelWidth > 0 ? implicitLabelHeight + spacing : 0) label: Text { x: control.leftPadding |