diff options
Diffstat (limited to 'src/imports/controls/material')
-rw-r--r-- | src/imports/controls/material/TextArea.qml | 4 | ||||
-rw-r--r-- | src/imports/controls/material/TextField.qml | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/imports/controls/material/TextArea.qml b/src/imports/controls/material/TextArea.qml index 7ba68017..82554b16 100644 --- a/src/imports/controls/material/TextArea.qml +++ b/src/imports/controls/material/TextArea.qml @@ -45,10 +45,10 @@ T.TextArea { id: control implicitWidth: Math.max(contentWidth + leftPadding + rightPadding, - background ? background.implicitWidth : 0, + implicitBackgroundWidth, placeholder.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(contentHeight + 1 + topPadding + bottomPadding, - background ? background.implicitHeight : 0, + implicitBackgroundHeight, placeholder.implicitHeight + 1 + topPadding + bottomPadding) topPadding: 8 diff --git a/src/imports/controls/material/TextField.qml b/src/imports/controls/material/TextField.qml index 62843774..f61c9ee8 100644 --- a/src/imports/controls/material/TextField.qml +++ b/src/imports/controls/material/TextField.qml @@ -44,11 +44,10 @@ import QtQuick.Controls.Material.impl 2.5 T.TextField { id: control - implicitWidth: Math.max(background ? background.implicitWidth : 0, - placeholderText ? placeholder.implicitWidth + leftPadding + rightPadding : 0) - || contentWidth + leftPadding + rightPadding - implicitHeight: Math.max(contentHeight + topPadding + bottomPadding, - background ? background.implicitHeight : 0, + implicitWidth: implicitBackgroundWidth + || Math.max(contentWidth, placeholder.implicitWidth) + leftPadding + rightPadding + implicitHeight: Math.max(implicitBackgroundHeight, + contentHeight + topPadding + bottomPadding, placeholder.implicitHeight + topPadding + bottomPadding) topPadding: 8 |