mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix input focus when pressing reply button
This commit is contained in:
parent
c74077a41f
commit
08e9461611
5 changed files with 5 additions and 0 deletions
|
@ -8,6 +8,7 @@ AbstractButton {
|
||||||
property color highlightColor: colors.highlight
|
property color highlightColor: colors.highlight
|
||||||
property color buttonTextColor: colors.buttonText
|
property color buttonTextColor: colors.buttonText
|
||||||
|
|
||||||
|
focusPolicy: Qt.NoFocus
|
||||||
width: 16
|
width: 16
|
||||||
height: 16
|
height: 16
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import im.nheko 1.0
|
||||||
TextEdit {
|
TextEdit {
|
||||||
textFormat: TextEdit.RichText
|
textFormat: TextEdit.RichText
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
focus: false
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
selectByMouse: !Settings.mobileMode
|
selectByMouse: !Settings.mobileMode
|
||||||
color: colors.text
|
color: colors.text
|
||||||
|
|
|
@ -79,6 +79,7 @@ Rectangle {
|
||||||
placeholderTextColor: colors.buttonText
|
placeholderTextColor: colors.buttonText
|
||||||
color: colors.text
|
color: colors.text
|
||||||
wrapMode: TextEdit.Wrap
|
wrapMode: TextEdit.Wrap
|
||||||
|
focus: true
|
||||||
onTextChanged: TimelineManager.timeline.input.updateState(selectionStart, selectionEnd, cursorPosition, text)
|
onTextChanged: TimelineManager.timeline.input.updateState(selectionStart, selectionEnd, cursorPosition, text)
|
||||||
onCursorPositionChanged: {
|
onCursorPositionChanged: {
|
||||||
TimelineManager.timeline.input.updateState(selectionStart, selectionEnd, cursorPosition, text);
|
TimelineManager.timeline.input.updateState(selectionStart, selectionEnd, cursorPosition, text);
|
||||||
|
|
|
@ -97,6 +97,7 @@ Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuItem {
|
MenuItem {
|
||||||
|
// TODO(Nico): Fix this still being iterated over, when using keyboard to select options
|
||||||
visible: messageContextMenu.isEncrypted
|
visible: messageContextMenu.isEncrypted
|
||||||
height: visible ? implicitHeight : 0
|
height: visible ? implicitHeight : 0
|
||||||
text: qsTr("View decrypted raw message")
|
text: qsTr("View decrypted raw message")
|
||||||
|
|
|
@ -336,6 +336,7 @@ TimelineViewManager::setHistoryView(const QString &room_id)
|
||||||
if (room != models.end()) {
|
if (room != models.end()) {
|
||||||
timeline_ = room.value().data();
|
timeline_ = room.value().data();
|
||||||
emit activeTimelineChanged(timeline_);
|
emit activeTimelineChanged(timeline_);
|
||||||
|
container->setFocus();
|
||||||
nhlog::ui()->info("Activated room {}", room_id.toStdString());
|
nhlog::ui()->info("Activated room {}", room_id.toStdString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue