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/fusion/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/fusion/TextArea.qml')
-rw-r--r-- | src/imports/controls/fusion/TextArea.qml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/imports/controls/fusion/TextArea.qml b/src/imports/controls/fusion/TextArea.qml index 36d9db04..4cf860f9 100644 --- a/src/imports/controls/fusion/TextArea.qml +++ b/src/imports/controls/fusion/TextArea.qml @@ -35,7 +35,7 @@ ****************************************************************************/ import QtQuick 2.11 -import QtQuick.Templates 2.4 as T +import QtQuick.Templates 2.5 as T import QtQuick.Controls 2.4 import QtQuick.Controls.impl 2.4 import QtQuick.Controls.Fusion 2.4 @@ -57,6 +57,7 @@ T.TextArea { color: control.palette.text selectionColor: control.palette.highlight selectedTextColor: control.palette.highlightedText + placeholderTextColor: Color.transparent(control.color, 0.5) PlaceholderText { id: placeholder @@ -65,10 +66,9 @@ T.TextArea { width: control.width - (control.leftPadding + control.rightPadding) height: control.height - (control.topPadding + control.bottomPadding) - opacity: 0.5 text: control.placeholderText font: control.font - color: control.color + color: control.placeholderTextColor verticalAlignment: control.verticalAlignment visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter) elide: Text.ElideRight |