gui: allow text selection in chat area
- Enable selectByMouse on chatArea TextArea - Only auto-scroll to bottom when no text is selected
This commit is contained in:
parent
dc1816f023
commit
45419393ae
|
|
@ -365,6 +365,7 @@ ApplicationWindow {
|
|||
TextArea {
|
||||
id: chatArea
|
||||
readOnly: true
|
||||
selectByMouse: true
|
||||
wrapMode: TextEdit.Wrap
|
||||
text: dbus.chatText || (dbus.activeSessionId
|
||||
? "(waiting for output...)"
|
||||
|
|
@ -374,7 +375,8 @@ ApplicationWindow {
|
|||
background: null
|
||||
|
||||
onTextChanged: {
|
||||
cursorPosition = text.length
|
||||
if (selectedText.length === 0)
|
||||
cursorPosition = text.length
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -371,6 +371,7 @@ ApplicationWindow {
|
|||
TextArea {
|
||||
id: chatArea
|
||||
readOnly: true
|
||||
selectByMouse: true
|
||||
wrapMode: TextEdit.Wrap
|
||||
text: dbus.chatText || (dbus.activeSessionId
|
||||
? "(waiting for output...)"
|
||||
|
|
@ -382,7 +383,8 @@ ApplicationWindow {
|
|||
background: null
|
||||
|
||||
onTextChanged: {
|
||||
cursorPosition = text.length
|
||||
if (selectedText.length === 0)
|
||||
cursorPosition = text.length
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue