gui: fix scrolling in chat and message input
- Restore ScrollView for message input to enable overflow scrolling - Remove manual wheel handlers that broke ListView virtualization - Let wheel events propagate naturally to ListView
This commit is contained in:
parent
df8e69aeb8
commit
2ea6ec1ba7
21
gui/main.qml
21
gui/main.qml
|
|
@ -1428,14 +1428,6 @@ property bool blockExpanded: {
|
||||||
chatView.interactive = true
|
chatView.interactive = true
|
||||||
mouse.accepted = false
|
mouse.accepted = false
|
||||||
}
|
}
|
||||||
onWheel: function(wheel) {
|
|
||||||
// Always allow wheel scrolling, even during selection
|
|
||||||
chatView.contentY = Math.max(0, Math.min(
|
|
||||||
chatView.contentHeight - chatView.height,
|
|
||||||
chatView.contentY - wheel.angleDelta.y
|
|
||||||
))
|
|
||||||
wheel.accepted = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Context menu (right button) - separate to avoid deselection
|
// Context menu (right button) - separate to avoid deselection
|
||||||
|
|
@ -1461,15 +1453,21 @@ property bool blockExpanded: {
|
||||||
Layout.margins: 6
|
Layout.margins: 6
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
|
||||||
// TextArea without ScrollView - wheel scrolls when content overflows
|
// TextArea in ScrollView for overflow, with context menu overlay
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: 200
|
Layout.maximumHeight: 200
|
||||||
Layout.preferredHeight: Math.min(promptInput.contentHeight + 16, 200)
|
Layout.preferredHeight: Math.min(promptInput.contentHeight + 16, 200)
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
id: promptScroll
|
||||||
|
anchors.fill: parent
|
||||||
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||||
|
|
||||||
TextArea {
|
TextArea {
|
||||||
id: promptInput
|
id: promptInput
|
||||||
anchors.fill: parent
|
width: promptScroll.width
|
||||||
placeholderText: {
|
placeholderText: {
|
||||||
if (!ollie.daemonConnected) return "Not connected"
|
if (!ollie.daemonConnected) return "Not connected"
|
||||||
if (!ollie.activeSessionId) return "No session"
|
if (!ollie.activeSessionId) return "No session"
|
||||||
|
|
@ -1502,8 +1500,9 @@ property bool blockExpanded: {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Context menu overlay - only catches right-click
|
// Context menu overlay - only catches right-click, on top of ScrollView
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
|
|
|
||||||
Reference in New Issue