[plasmacomponents3/TextField|TextArea] Fix placeholder text

In TextField, it was not disabled, so the mousearea that changes the
cursor shape wasn't working properly. Fixed now.

In TextArea, it was not disabled, not the right color, and was
inappropriately selectable. Fixed now.

The UI tests were testing for these conditions but were broken, and are
now fixed by these changes.

BUG: 433864
FIXED-IN: 5.80
This commit is contained in:
Nate Graham 2021-03-02 12:41:59 -07:00
parent 6ac6ff028e
commit 15b75de387
2 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,8 @@ T.TextArea {
text: control.placeholderText text: control.placeholderText
font: control.font font: control.font
color: theme.viewTextColor color: theme.viewTextColor
opacity: 0.5
enabled: false
horizontalAlignment: control.horizontalAlignment horizontalAlignment: control.horizontalAlignment
verticalAlignment: control.verticalAlignment verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter) visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)

View File

@ -104,6 +104,7 @@ T.TextField {
font: control.font font: control.font
color: theme.viewTextColor color: theme.viewTextColor
opacity: 0.5 opacity: 0.5
enabled: false
horizontalAlignment: control.horizontalAlignment horizontalAlignment: control.horizontalAlignment
verticalAlignment: control.verticalAlignment verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter) visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)