Skip to content
Snippets Groups Projects
Commit a505bc9e authored by Franck Laurent's avatar Franck Laurent Committed by Sébastien Blin
Browse files

modalTextEdit: show placeholder and hide under line text when selected

GitLab: #986

Change-Id: I232aa5ce9eed883aaef43ea96c2a798103ec7984
parent 6727e444
Branches
Tags
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment