diff --git a/tests/ui/components/dialog/DialogDescription.qml b/tests/ui/components/dialog/DialogDescription.qml index fa63c1950..c946b613d 100644 --- a/tests/ui/components/dialog/DialogDescription.qml +++ b/tests/ui/components/dialog/DialogDescription.qml @@ -9,7 +9,9 @@ import 'qrc:/ui/style/components' Item { property alias text: description.text - height: text ? DialogStyle.description.height : DialogStyle.description.minHeight + height: (!text && DialogStyle.description.verticalMargin) || undefined + implicitHeight: (text && (description.implicitHeight + DialogStyle.description.verticalMargin)) || + 0 Text { id: description diff --git a/tests/ui/style/components/DialogStyle.qml b/tests/ui/style/components/DialogStyle.qml index d510be8e6..36e3d8ba1 100644 --- a/tests/ui/style/components/DialogStyle.qml +++ b/tests/ui/style/components/DialogStyle.qml @@ -18,7 +18,6 @@ QtObject { property QtObject description: QtObject { property int fontSize: 12 - property int height: 90 // Height with text. - property int minHeight: 25 // Height without text. + property int verticalMargin: 25 } }