aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-06-12 12:08:12 +0200
committerMitch Curtis <mitch.curtis@qt.io>2018-06-13 10:05:41 +0000
commit06b31b60fe3210d55d978205b1fa302feda5d819 (patch)
tree38f0e1e1811db6a16b81d7ab524bbcbb03b1f287 /src/imports/controls/material
parent08437d525a168df9abbda74d5b5ffddfd2841702 (diff)
TextArea, TextField: use the control's renderType in placeholder text
The placeholder text's renderType should cohere to the renderType of the control. This is already the case for font, and sometimes color too. This solution avoids the need to expose a new property. Task-number: QTBUG-68769 Change-Id: I6711aea83b7b8ee27f56b9c905aa4870465e3fd9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/imports/controls/material')
-rw-r--r--src/imports/controls/material/TextArea.qml1
-rw-r--r--src/imports/controls/material/TextField.qml2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/imports/controls/material/TextArea.qml b/src/imports/controls/material/TextArea.qml
index 2dc64570..207d12c5 100644
--- a/src/imports/controls/material/TextArea.qml
+++ b/src/imports/controls/material/TextArea.qml
@@ -71,6 +71,7 @@ T.TextArea {
color: control.Material.hintTextColor
verticalAlignment: control.verticalAlignment
elide: Text.ElideRight
+ renderType: control.renderType
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
}
diff --git a/src/imports/controls/material/TextField.qml b/src/imports/controls/material/TextField.qml
index 6ce905af..e8af67d4 100644
--- a/src/imports/controls/material/TextField.qml
+++ b/src/imports/controls/material/TextField.qml
@@ -72,8 +72,8 @@ T.TextField {
color: control.Material.hintTextColor
verticalAlignment: control.verticalAlignment
elide: Text.ElideRight
+ renderType: control.renderType
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
-
}
background: Rectangle {