diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-03-30 00:31:49 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-03-30 00:31:49 +0200 |
commit | a3ae90415c01bc185b10d60d20928601baa703b7 (patch) | |
tree | abecb55b11ba07dea52671f9324ecc45a63cf9e1 /resources | |
parent | Merge pull request #1019 from maltee1/qml_createroom (diff) | |
parent | add jump to end button (diff) | |
download | nheko-a3ae90415c01bc185b10d60d20928601baa703b7.tar.xz |
Merge branch 'go_to_bottom' of https://github.com/maltee1/nheko into maltee1-go_to_bottom
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/MessageView.qml | 58 |
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 + } + } + ] + } } |