summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-11-25 17:38:06 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-11-25 19:05:12 +0100
commit08e94616113921dbbbf3bcfe2ec4cee7e28eaf1b (patch)
tree9c5bad4fa33de5ac6e21fc239994cee1da38460f
parentImplement Qml drag and drop (diff)
downloadnheko-08e94616113921dbbbf3bcfe2ec4cee7e28eaf1b.tar.xz
Fix input focus when pressing reply button
-rw-r--r--resources/qml/ImageButton.qml1
-rw-r--r--resources/qml/MatrixText.qml1
-rw-r--r--resources/qml/MessageInput.qml1
-rw-r--r--resources/qml/TimelineView.qml1
-rw-r--r--src/timeline/TimelineViewManager.cpp1
5 files changed, 5 insertions, 0 deletions
diff --git a/resources/qml/ImageButton.qml b/resources/qml/ImageButton.qml

index 49ddf671..4ebda680 100644 --- a/resources/qml/ImageButton.qml +++ b/resources/qml/ImageButton.qml
@@ -8,6 +8,7 @@ AbstractButton { property color highlightColor: colors.highlight property color buttonTextColor: colors.buttonText + focusPolicy: Qt.NoFocus width: 16 height: 16 diff --git a/resources/qml/MatrixText.qml b/resources/qml/MatrixText.qml
index a5781c73..bb3b4296 100644 --- a/resources/qml/MatrixText.qml +++ b/resources/qml/MatrixText.qml
@@ -5,6 +5,7 @@ import im.nheko 1.0 TextEdit { textFormat: TextEdit.RichText readOnly: true + focus: false wrapMode: Text.Wrap selectByMouse: !Settings.mobileMode color: colors.text diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml
index 812c450e..c221cf3e 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml
@@ -79,6 +79,7 @@ Rectangle { placeholderTextColor: colors.buttonText color: colors.text wrapMode: TextEdit.Wrap + focus: true onTextChanged: TimelineManager.timeline.input.updateState(selectionStart, selectionEnd, cursorPosition, text) onCursorPositionChanged: { TimelineManager.timeline.input.updateState(selectionStart, selectionEnd, cursorPosition, text); diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index ac998a81..4234bb6d 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml
@@ -97,6 +97,7 @@ Page { } MenuItem { + // TODO(Nico): Fix this still being iterated over, when using keyboard to select options visible: messageContextMenu.isEncrypted height: visible ? implicitHeight : 0 text: qsTr("View decrypted raw message") diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp
index 866e7c51..d0356e15 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp
@@ -336,6 +336,7 @@ TimelineViewManager::setHistoryView(const QString &room_id) if (room != models.end()) { timeline_ = room.value().data(); emit activeTimelineChanged(timeline_); + container->setFocus(); nhlog::ui()->info("Activated room {}", room_id.toStdString()); } }