Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8a78d5d

Browse files
committedFeb 5, 2025··
Add button to scroll to top when activity list is long.
Signed-off-by: Camila Ayres <hello@camilasan.com>
1 parent fd1e139 commit 8a78d5d

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed
 

‎src/gui/tray/ActivityList.qml

+24
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,30 @@ ScrollView {
114114
}
115115
}
116116

117+
Row {
118+
anchors.bottom: parent.bottom
119+
anchors.right: parent.right
120+
121+
Button {
122+
id: scrollToTopButton
123+
124+
hoverEnabled: true
125+
padding: Style.smallSpacing
126+
127+
Accessible.role: Accessible.Button
128+
Accessible.name: qsTr("Scroll to top")
129+
Accessible.onPressAction: scrollToTopButton.clicked()
130+
131+
icon.source: "image://svgimage-custom-color/chevron-double-up.svg/" + palette.buttonText
132+
icon.width: Style.activityListButtonIconSize
133+
icon.height: Style.activityListButtonIconSize
134+
135+
onClicked: controlRoot.scrollToTop()
136+
137+
visible: !controlRoot.atYBeginning && controlRoot.contentHeight > controlRoot.height
138+
}
139+
}
140+
117141
Column {
118142
id: placeholderColumn
119143
width: parent.width * 0.8

‎theme.qrc.in

+1
Original file line numberDiff line numberDiff line change
@@ -241,5 +241,6 @@
241241
<file>theme/send.svg</file>
242242
<file>theme/call-notification.wav</file>
243243
<file>theme/talk-app.svg</file>
244+
<file>theme/chevron-double-up.svg</file>
244245
</qresource>
245246
</RCC>

‎theme/chevron-double-up.svg

+1
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.