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

modalTextEdit: show placeholder and hide under line text when selected

GitLab: #986

Change-Id: I232aa5ce9eed883aaef43ea96c2a798103ec7984
This commit is contained in:
Franck LAURENT 2023-03-09 10:39:44 -05:00 committed by Sébastien Blin
parent 6727e4445e
commit a505bc9eef
2 changed files with 4 additions and 5 deletions

View file

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

View file

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