1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-07-08 01:25:24 +02:00

modalTextEdit: hide placeholder when selected

GitLab: #986
Change-Id: I4672ca2240a04a2a25780506750d0233b442aba5
This commit is contained in:
Aline Gondim Santos 2023-03-02 11:35:06 -03:00
parent 410a15a09f
commit 06e9e91c4d
2 changed files with 4 additions and 3 deletions

View file

@ -50,6 +50,7 @@ TextField {
placeholderTextColor: !isActive
? JamiTheme.transparentColor
: JamiTheme.placeholderTextColor
property string initialPlaceholderText
property alias infoTipText: infoTip.text
@ -105,7 +106,7 @@ TextField {
font.pointSize: root.font.pointSize
anchors.baseline: root.baseline
anchors.horizontalCenter: root.horizontalCenter
text: root.placeholderText
text: root.initialPlaceholderText
color: root.baseColor
visible: !root.isActive && !readOnly && root.text.toString() === ""
}
@ -146,7 +147,7 @@ TextField {
font.pointSize: root.font.pointSize - 3
anchors.top: baselineLine.bottom
anchors.topMargin: 2
text: root.placeholderText
text: root.initialPlaceholderText
color: root.baseColor
// Show the alternate placeholder while the user types.

View file

@ -92,7 +92,7 @@ Loader {
font.pointSize: root.fontPointSize
font.bold: root.fontBold
echoMode: root.echoMode
placeholderText: root.placeholderText
initialPlaceholderText: root.placeholderText
onAccepted: root.accepted()
onTextChanged: dynamicText = text
text: staticText