diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-04-19 11:49:52 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-04-19 11:58:01 +0000 |
commit | fd7bd4ec5116fd543ad21a6a63969f08deac4925 (patch) | |
tree | f290c45595129c2c18370866c5c29c361f788368 /src/imports/controls/material | |
parent | 06071fd14d6cff4d3f9b3cdff92f5ddf4bf2b3bc (diff) |
Dial: follow the "standard" implicit size calculation practices
Change-Id: I9a08ebd646a720707ed70180b68942be378265b9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material')
-rw-r--r-- | src/imports/controls/material/Dial.qml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/imports/controls/material/Dial.qml b/src/imports/controls/material/Dial.qml index f4d49175..1d2c7914 100644 --- a/src/imports/controls/material/Dial.qml +++ b/src/imports/controls/material/Dial.qml @@ -42,10 +42,15 @@ import QtQuick.Controls.Material.impl 2.5 T.Dial { id: control - implicitWidth: 100 - implicitHeight: 100 + implicitWidth: Math.max(implicitBackgroundWidth, + implicitContentWidth + leftPadding + rightPadding) || 100 // ### remove 100 in Qt 6 + implicitHeight: Math.max(implicitBackgroundHeight, + implicitContentHeight + topPadding + bottomPadding) || 100 // ### remove 100 in Qt 6 background: Rectangle { + implicitWidth: 100 + implicitHeight: 100 + x: control.width / 2 - width / 2 y: control.height / 2 - height / 2 width: Math.max(64, Math.min(control.width, control.height)) |