Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add button to scroll to top when activity list is long. #7823

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/gui/tray/ActivityList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,28 @@ ScrollView {
}
}

Button {
id: scrollToTopButton

anchors.bottom: parent.bottom
anchors.right: parent.right

hoverEnabled: true
padding: Style.smallSpacing

Accessible.role: Accessible.Button
Accessible.name: qsTr("Scroll to top")
Accessible.onPressAction: scrollToTopButton.clicked()

icon.source: "image://svgimage-custom-color/chevron-double-up.svg/" + palette.buttonText
icon.width: Style.activityListButtonIconSize
icon.height: Style.activityListButtonIconSize

onClicked: controlRoot.scrollToTop()

visible: !controlRoot.atYBeginning && controlRoot.contentHeight > controlRoot.height
}

Column {
id: placeholderColumn
width: parent.width * 0.8
Expand Down
1 change: 1 addition & 0 deletions theme.qrc.in
Original file line number Diff line number Diff line change
Expand Up @@ -241,5 +241,6 @@
<file>theme/send.svg</file>
<file>theme/call-notification.wav</file>
<file>theme/talk-app.svg</file>
<file>theme/chevron-double-up.svg</file>
</qresource>
</RCC>
1 change: 1 addition & 0 deletions theme/chevron-double-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading