mirror of
https://github.com/savoirfairelinux/jami-client-qt.git
synced 2026-01-03 02:19:13 +08:00
TextEdit: disable persistent mode and made right clickable the text
Change-Id: If8f92dfdba20005fe8430bfbe880167061301b95
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user