diff options
author | Yulong Bai <yulong.bai@qt.io> | 2018-02-20 14:42:49 +0100 |
---|---|---|
committer | Yulong Bai <yulong.bai@qt.io> | 2018-02-21 14:03:30 +0000 |
commit | 6b28a01d3f4c7c28e38b395bc3d916154bdfdcaa (patch) | |
tree | 343c7b329dfe2c4897e966755316291b8fe36cbe /src/imports/controls/TextArea.qml | |
parent | 8505b96fbe88980e45c0f78792ad48c02f34bfa7 (diff) |
QQuickTextArea: add placeholderTextColor property
Add placeholderTextColor property for user convenience to customize the
placeholderText color to fit the backgrounds.
[ChangeLog][TextArea] Added placeholderTextColor property for user
convenience to customize the placeholderText color to fit the backgrounds.
Change-Id: Iea0233f909ca9cfe19d88f9bc24691aa35b5ab35
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/controls/TextArea.qml')
-rw-r--r-- | src/imports/controls/TextArea.qml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/imports/controls/TextArea.qml b/src/imports/controls/TextArea.qml index 04a44eae..965488e2 100644 --- a/src/imports/controls/TextArea.qml +++ b/src/imports/controls/TextArea.qml @@ -37,7 +37,7 @@ import QtQuick 2.11 import QtQuick.Controls 2.4 import QtQuick.Controls.impl 2.4 -import QtQuick.Templates 2.4 as T +import QtQuick.Templates 2.5 as T T.TextArea { id: control @@ -53,6 +53,7 @@ T.TextArea { leftPadding: padding + 4 color: control.palette.text + placeholderTextColor: Color.transparent(control.color, 0.5) selectionColor: control.palette.highlight selectedTextColor: control.palette.highlightedText @@ -65,8 +66,7 @@ T.TextArea { text: control.placeholderText font: control.font - opacity: 0.5 - color: control.color + color: control.placeholderTextColor verticalAlignment: control.verticalAlignment visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter) elide: Text.ElideRight |