mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 04:58:49 +03:00
Fix some TapHandler focus issues
This commit is contained in:
parent
9d97f9f705
commit
18e96d5c7d
10 changed files with 29 additions and 17 deletions
|
@ -61,6 +61,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
layer.effect: OpacityMask {
|
layer.effect: OpacityMask {
|
||||||
|
cached: true
|
||||||
|
|
||||||
maskSource: Rectangle {
|
maskSource: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
@ -15,7 +15,6 @@ ScrollView {
|
||||||
clip: false
|
clip: false
|
||||||
palette: colors
|
palette: colors
|
||||||
padding: 8
|
padding: 8
|
||||||
|
|
||||||
ScrollBar.horizontal.visible: false
|
ScrollBar.horizontal.visible: false
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
|
|
|
@ -29,11 +29,13 @@ Item {
|
||||||
TapHandler {
|
TapHandler {
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
onSingleTapped: messageContextMenu.show(model.id, model.type, model.isEncrypted, model.isEditable)
|
onSingleTapped: messageContextMenu.show(model.id, model.type, model.isEncrypted, model.isEditable)
|
||||||
|
gesturePolicy: TapHandler.ReleaseWithinBounds
|
||||||
}
|
}
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
onLongPressed: messageContextMenu.show(model.id, model.type, model.isEncrypted, model.isEditable)
|
onLongPressed: messageContextMenu.show(model.id, model.type, model.isEncrypted, model.isEditable)
|
||||||
onDoubleTapped: chat.model.reply = model.id
|
onDoubleTapped: chat.model.reply = model.id
|
||||||
|
gesturePolicy: TapHandler.ReleaseWithinBounds
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
|
@ -109,6 +109,7 @@ Page {
|
||||||
|
|
||||||
Platform.MenuItem {
|
Platform.MenuItem {
|
||||||
id: reactionOption
|
id: reactionOption
|
||||||
|
|
||||||
text: qsTr("React")
|
text: qsTr("React")
|
||||||
onTriggered: emojiPopup.show(null, function(emoji) {
|
onTriggered: emojiPopup.show(null, function(emoji) {
|
||||||
TimelineManager.queueReactionMessage(messageContextMenu.eventId, emoji);
|
TimelineManager.queueReactionMessage(messageContextMenu.eventId, emoji);
|
||||||
|
|
|
@ -19,7 +19,11 @@ Rectangle {
|
||||||
color: colors.window
|
color: colors.window
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
onSingleTapped: TimelineManager.timeline.openRoomSettings()
|
onSingleTapped: {
|
||||||
|
TimelineManager.timeline.openRoomSettings();
|
||||||
|
eventPoint.accepted = true;
|
||||||
|
}
|
||||||
|
gesturePolicy: TapHandler.ReleaseWithinBounds
|
||||||
}
|
}
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
|
@ -57,7 +61,7 @@ Rectangle {
|
||||||
height: avatarSize
|
height: avatarSize
|
||||||
url: room ? room.roomAvatarUrl.replace("mxc://", "image://MxcImage/") : ""
|
url: room ? room.roomAvatarUrl.replace("mxc://", "image://MxcImage/") : ""
|
||||||
displayName: room ? room.roomName : qsTr("No room selected")
|
displayName: room ? room.roomName : qsTr("No room selected")
|
||||||
onClicked: TimelineManager.openRoomSettings()
|
onClicked: TimelineManager.timeline.openRoomSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
@ -69,7 +73,6 @@ Rectangle {
|
||||||
text: room ? room.roomName : qsTr("No room selected")
|
text: room ? room.roomName : qsTr("No room selected")
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MatrixText {
|
MatrixText {
|
||||||
|
|
|
@ -35,6 +35,7 @@ Item {
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
onSingleTapped: TimelineManager.timeline.saveMedia(model.data.id)
|
onSingleTapped: TimelineManager.timeline.saveMedia(model.data.id)
|
||||||
|
gesturePolicy: TapHandler.ReleaseWithinBounds
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorShape {
|
CursorShape {
|
||||||
|
|
|
@ -38,7 +38,11 @@ Item {
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
enabled: model.data.type == MtxEvent.ImageMessage && img.status == Image.Ready
|
enabled: model.data.type == MtxEvent.ImageMessage && img.status == Image.Ready
|
||||||
onSingleTapped: TimelineManager.openImageOverlay(model.data.url, model.data.id)
|
onSingleTapped: {
|
||||||
|
TimelineManager.openImageOverlay(model.data.url, model.data.id);
|
||||||
|
eventPoint.accepted = true;
|
||||||
|
}
|
||||||
|
gesturePolicy: TapHandler.ReleaseWithinBounds
|
||||||
}
|
}
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
|
|
|
@ -19,6 +19,7 @@ Item {
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
onSingleTapped: chat.positionViewAtIndex(chat.model.idToIndex(modelData.id), ListView.Contain)
|
onSingleTapped: chat.positionViewAtIndex(chat.model.idToIndex(modelData.id), ListView.Contain)
|
||||||
|
gesturePolicy: TapHandler.ReleaseWithinBounds
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorShape {
|
CursorShape {
|
||||||
|
@ -51,6 +52,7 @@ Item {
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
onSingleTapped: chat.model.openUserProfile(reply.modelData.userId)
|
onSingleTapped: chat.model.openUserProfile(reply.modelData.userId)
|
||||||
|
gesturePolicy: TapHandler.ReleaseWithinBounds
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,6 @@ Menu {
|
||||||
modal: true
|
modal: true
|
||||||
focus: true
|
focus: true
|
||||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
||||||
|
|
||||||
height: columnView.implicitHeight + 4
|
height: columnView.implicitHeight + 4
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
Loading…
Reference in a new issue