summary refs log tree commit diff
diff options
context:
space:
mode:
authorMalte E <malte.e@mailbox.org>2022-03-29 23:11:25 +0200
committerMalte E <malte.e@mailbox.org>2022-03-29 23:11:25 +0200
commit8c8305bf8af744b9066c02c74f349f88e16cff29 (patch)
treec1402185afbdf75dca0450f52545ce2281ccc706
parentdrag to reply (#1018) (diff)
downloadnheko-8c8305bf8af744b9066c02c74f349f88e16cff29.tar.xz
add jump to end button
-rw-r--r--resources/qml/MessageView.qml58
1 files changed, 58 insertions, 0 deletions
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml

index 3763c24a..541677a7 100644 --- a/resources/qml/MessageView.qml +++ b/resources/qml/MessageView.qml
@@ -754,4 +754,62 @@ Item { } } + RoundButton { + id: toEndButton + anchors { + bottom: parent.bottom + right: scrollbar.left + bottomMargin: Nheko.paddingMedium+(fullWidth-width)/2 + rightMargin: Nheko.paddingMedium+(fullWidth-width)/2 + } + property int fullWidth: 40 + width: fullWidth + height: width + radius: width/2 + onClicked: chat.positionViewAtBeginning(); + flat: true + highlighted: true + + states: State { + name: "hidden" + when: chat.atYEnd + } + + Image { + id: buttonImg + anchors.fill: parent + anchors.margins: Nheko.paddingMedium + source: ("image://colorimage/" + ":/icons/icons/ui/download.svg" + "?" + Nheko.colors.buttonText) + fillMode: Image.PreserveAspectFit + } + + transitions: [ + Transition { + from: "" + to: "hidden" + + PropertyAnimation { + target: toEndButton + properties: "width" + easing.type: Easing.InOutQuad + from: 40 + to: 0 + duration: 200 + } + }, + Transition { + from: "hidden" + to: "" + + PropertyAnimation { + target: toEndButton + properties: "width" + easing.type: Easing.InOutQuad + from: 0 + to: 40 + duration: 200 + } + } + ] + } }