Skip to content
Snippets Groups Projects
Commit 855b0233 authored by Liam Coursodon's avatar Liam Coursodon
Browse files

TextEdit: disable persistent mode and made right clickable the text

Change-Id: If8f92dfdba20005fe8430bfbe880167061301b95
parent a0f0dd13
Branches
Tags
No related merge requests found
......@@ -36,6 +36,7 @@ TextField {
}
signal keyPressed
signal rejected
property bool inputIsValid: true
......@@ -87,6 +88,9 @@ TextField {
root.accepted();
}
event.accepted = true;
} else if (event.key === Qt.Key_Escape) {
root.focus = false;
root.rejected();
} else {
root.keyPressed();
}
......
......@@ -122,6 +122,10 @@ Loader {
echoMode: root.echoMode
placeholderText: root.placeholderText
onAccepted: root.accepted()
onRejected: {
root.editMode = false;
text = staticText;
}
onKeyPressed: root.keyPressed()
onTextChanged: dynamicText = text
text: staticText
......
......@@ -51,7 +51,6 @@ Rectangle {
anchors.right: parent.right
height: headerRow.implicitHeight + JamiTheme.preferredMarginSize + settingsTabButton.height
RowLayout {
id: headerRow
spacing: 15
......@@ -105,7 +104,7 @@ Rectangle {
}
editMode: false
isPersistent: false
placeholderText: JamiStrings.title
onActiveFocusChanged: {
......@@ -148,7 +147,6 @@ Rectangle {
onAccepted: ConversationsAdapter.updateConversationDescription(LRCInstance.selectedConvUid, dynamicText)
editMode: false
isPersistent: false
onActiveFocusChanged: {
if (!activeFocus) {
......
......@@ -76,16 +76,13 @@ SettingsPageBase {
font.pixelSize: JamiTheme.materialLineEditPixelSize
}
maxCharacters: JamiTheme.maximumCharacters
placeholderText: JamiStrings.displayName
editMode: false
isPersistent: false
Layout.alignment: Qt.AlignCenter
Layout.preferredHeight: JamiTheme.preferredFieldHeight + 8
Layout.fillWidth: true
maxCharacters: JamiTheme.maximumCharacters
placeholderText: JamiStrings.displayName
staticText: CurrentAccount.alias
elidedText: displayNameLineEditTextSize.elidedText
......
......@@ -78,7 +78,6 @@ RowLayout {
}
editMode: false
isPersistent: false
onActiveFocusChanged: {
if (!activeFocus) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment