diff options
Diffstat (limited to 'src/imports/controls/imagine/TextArea.qml')
-rw-r--r-- | src/imports/controls/imagine/TextArea.qml | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/imports/controls/imagine/TextArea.qml b/src/imports/controls/imagine/TextArea.qml index 1e351ab8..94fe237c 100644 --- a/src/imports/controls/imagine/TextArea.qml +++ b/src/imports/controls/imagine/TextArea.qml @@ -34,21 +34,21 @@ ** ****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Templates 2.4 as T -import QtQuick.Controls 2.4 -import QtQuick.Controls.impl 2.4 -import QtQuick.Controls.Imagine 2.4 -import QtQuick.Controls.Imagine.impl 2.4 +import QtQuick 2.12 +import QtQuick.Templates 2.5 as T +import QtQuick.Controls 2.5 +import QtQuick.Controls.impl 2.5 +import QtQuick.Controls.Imagine 2.5 +import QtQuick.Controls.Imagine.impl 2.5 T.TextArea { id: control implicitWidth: Math.max(contentWidth + leftPadding + rightPadding, - background ? background.implicitWidth : 0, + implicitBackgroundWidth + leftInset + rightInset, placeholder.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(contentHeight + topPadding + bottomPadding, - background ? background.implicitHeight : 0, + implicitBackgroundHeight + topInset + bottomInset, placeholder.implicitHeight + topPadding + bottomPadding) topPadding: background ? background.topPadding : 0 @@ -56,10 +56,16 @@ T.TextArea { rightPadding: background ? background.rightPadding : 0 bottomPadding: background ? background.bottomPadding : 0 + topInset: background ? -background.topInset || 0 : 0 + leftInset: background ? -background.leftInset || 0 : 0 + rightInset: background ? -background.rightInset || 0 : 0 + bottomInset: background ? -background.bottomInset || 0 : 0 + color: control.palette.text selectionColor: control.palette.highlight selectedTextColor: control.palette.highlightedText verticalAlignment: Qt.AlignVCenter + placeholderTextColor: Color.transparent(control.color, 0.5) PlaceholderText { id: placeholder @@ -70,19 +76,14 @@ T.TextArea { 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 renderType: control.renderType - opacity: 0.5 } background: NinePatchImage { - x: -leftInset; y: -topInset - width: control.width + leftInset + rightInset - height: control.height + topInset + bottomInset - source: Imagine.url + "textarea-background" NinePatchImageSelector on source { states: [ |