gui: add scroll-to-bottom button
Shows when user has scrolled up (followTail=false). Clicking scrolls to bottom and re-enables follow mode.
This commit is contained in:
parent
4b21deec14
commit
a4c6802430
19
gui/main.qml
19
gui/main.qml
|
|
@ -900,7 +900,24 @@ ApplicationWindow {
|
|||
parentListView: chatView
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Scroll to bottom button
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: 12
|
||||
text: "↓"
|
||||
font.pixelSize: 16
|
||||
implicitWidth: 36
|
||||
implicitHeight: 36
|
||||
visible: chatView.visible && !chatView.followTail
|
||||
onClicked: {
|
||||
chatView.followTail = true
|
||||
chatView.positionViewAtEnd()
|
||||
}
|
||||
ToolTip.text: "Scroll to bottom"
|
||||
ToolTip.visible: hovered
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle { Layout.fillWidth: true; height: 1; color: theme.midColor }
|
||||
|
|
|
|||
Reference in New Issue