From a0246f6a7c38c3e27b329b9eb727ce359fd1a40e Mon Sep 17 00:00:00 2001 From: Patryk Osmaczko Date: Sun, 27 Mar 2022 23:01:52 +0200 Subject: [PATCH] fix(StatusInput): add implicitHeight It makes it work with layouts correctly. --- .../src/StatusQ/Controls/StatusInput.qml | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusInput.qml b/ui/StatusQ/src/StatusQ/Controls/StatusInput.qml index 6e96b1e70a..c5d2a913f4 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusInput.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusInput.qml @@ -33,19 +33,22 @@ import StatusQ.Controls.Validators 0.1 Item { id: root implicitWidth: 480 - height: (label.visible ? - label.anchors.topMargin + - label.height : - charLimitLabel.visible ? - charLimitLabel.anchors.topMargin + - charLimitLabel.height : - 0) + - statusBaseInput.anchors.topMargin + - statusBaseInput.height + - (errorMessage.visible ? - errorMessage.anchors.topMargin + - errorMessage.height : - 0) + 8 + implicitHeight: (label.visible ? + label.anchors.topMargin + + label.height : + charLimitLabel.visible ? + charLimitLabel.anchors.topMargin + + charLimitLabel.height : + 0) + + statusBaseInput.anchors.topMargin + + statusBaseInput.height + + (errorMessage.visible ? + errorMessage.anchors.topMargin + + errorMessage.height : + 0) + 8 + + height: implicitHeight + width: implicitWidth property alias input: statusBaseInput property alias valid: statusBaseInput.valid