remove scroll-to-bottom button
This commit is contained in:
parent
b77667fbfb
commit
bdad2b740f
76
gui/main.qml
76
gui/main.qml
|
|
@ -1224,33 +1224,30 @@ ApplicationWindow {
|
|||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
ScrollView {
|
||||
anchors.fill: parent
|
||||
clip: true
|
||||
clip: true
|
||||
|
||||
// Placeholder when no agent selected or disconnected
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
text: {
|
||||
if (!ollie.daemonConnected) return "Not connected"
|
||||
if (!ollie.activeSessionId) return "Select a session"
|
||||
return "Select an agent to view chat"
|
||||
}
|
||||
color: theme.midColor
|
||||
font.italic: true
|
||||
font.pixelSize: theme.fontSize > 0 ? theme.fontSize : 12
|
||||
visible: !ollie.activeAgentId || !ollie.daemonConnected
|
||||
// Placeholder when no agent selected or disconnected
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
text: {
|
||||
if (!ollie.daemonConnected) return "Not connected"
|
||||
if (!ollie.activeSessionId) return "Select a session"
|
||||
return "Select an agent to view chat"
|
||||
}
|
||||
color: theme.midColor
|
||||
font.italic: true
|
||||
font.pixelSize: theme.fontSize > 0 ? theme.fontSize : 12
|
||||
visible: !ollie.activeAgentId || !ollie.daemonConnected
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: chatView
|
||||
model: chatModel
|
||||
spacing: 4
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
visible: ollie.daemonConnected && ollie.activeAgentId !== ""
|
||||
ListView {
|
||||
id: chatView
|
||||
model: chatModel
|
||||
spacing: 4
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
visible: ollie.daemonConnected && ollie.activeAgentId !== ""
|
||||
|
||||
// Auto-scroll when near bottom (within ~50px or at end)
|
||||
// Reset to true on new blocks, user can scroll up to disable
|
||||
|
|
@ -1588,40 +1585,9 @@ property bool blockExpanded: {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Scroll-to-bottom floating button
|
||||
Rectangle {
|
||||
id: scrollToBottomBtn
|
||||
width: 40
|
||||
height: 40
|
||||
radius: 20
|
||||
color: theme.highlightColor
|
||||
opacity: 0.9
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: 16
|
||||
visible: !chatView.shouldAutoScroll && chatView.count > 0 && chatView.visible
|
||||
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
text: "↓"
|
||||
font.pixelSize: 20
|
||||
font.bold: true
|
||||
color: theme.highlightedTextColor
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
chatView.shouldAutoScroll = true
|
||||
chatView.positionViewAtEnd()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle { Layout.fillWidth: true; height: 1; color: theme.midColor }
|
||||
|
|
|
|||
Reference in New Issue