drag to reply (#1018)
This commit is contained in:
parent
01347c353d
commit
5078bdd14f
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import "./delegates"
|
import "./delegates"
|
||||||
import "./emoji"
|
import "./emoji"
|
||||||
import QtQuick 2.12
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.13
|
import QtQuick.Window 2.13
|
||||||
@ -66,6 +66,32 @@ AbstractButton {
|
|||||||
onPressAndHold: messageContextMenu.show(eventId, type, isSender, isEncrypted, isEditable, contentItem.child.hoveredLink, contentItem.child.copyText)
|
onPressAndHold: messageContextMenu.show(eventId, type, isSender, isEncrypted, isEditable, contentItem.child.hoveredLink, contentItem.child.copyText)
|
||||||
onDoubleClicked: chat.model.reply = eventId
|
onDoubleClicked: chat.model.reply = eventId
|
||||||
|
|
||||||
|
DragHandler {
|
||||||
|
id: draghandler
|
||||||
|
yAxis.enabled: false
|
||||||
|
xAxis.maximum: 100
|
||||||
|
xAxis.minimum: -100
|
||||||
|
onActiveChanged: {
|
||||||
|
if(!active && (x < -70 || x > 70))
|
||||||
|
chat.model.reply = eventId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
states: State {
|
||||||
|
name: "dragging"
|
||||||
|
when: draghandler.active
|
||||||
|
}
|
||||||
|
transitions: Transition {
|
||||||
|
from: "dragging"
|
||||||
|
to: ""
|
||||||
|
PropertyAnimation {
|
||||||
|
target: r
|
||||||
|
properties: "x"
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
|
to: 0
|
||||||
|
duration: 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: row
|
id: row
|
||||||
property bool bubbleOnRight : isSender && Settings.bubbles
|
property bool bubbleOnRight : isSender && Settings.bubbles
|
||||||
|
@ -23,6 +23,7 @@ Item {
|
|||||||
property var room: null
|
property var room: null
|
||||||
property var roomPreview: null
|
property var roomPreview: null
|
||||||
property bool showBackButton: false
|
property bool showBackButton: false
|
||||||
|
clip: true
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
visible: !room && !TimelineManager.isInitialSync && (!roomPreview || !roomPreview.roomid)
|
visible: !room && !TimelineManager.isInitialSync && (!roomPreview || !roomPreview.roomid)
|
||||||
|
@ -131,6 +131,7 @@ Container {
|
|||||||
interactive: singlePageMode
|
interactive: singlePageMode
|
||||||
highlightMoveDuration: container.singlePageMode ? 200 : 0
|
highlightMoveDuration: container.singlePageMode ? 200 : 0
|
||||||
currentIndex: container.singlePageMode ? container.pageIndex : 0
|
currentIndex: container.singlePageMode ? container.pageIndex : 0
|
||||||
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user