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:
parent
6727e4445e
commit
a505bc9eef
2 changed files with 4 additions and 5 deletions
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue