mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-15 03:04:31 +10:00
feat(ai): auto-resize input with scroll (#3148)
This commit is contained in:
@@ -497,17 +497,24 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
|
||||
RowLayout { // Input field and send button
|
||||
id: inputFieldRowLayout
|
||||
anchors {
|
||||
top: attachedFileIndicator.bottom
|
||||
bottom: commandButtonsRow.top
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
topMargin: 5
|
||||
bottomMargin: 5
|
||||
}
|
||||
spacing: 0
|
||||
|
||||
StyledTextArea { // The actual TextArea
|
||||
id: messageInputField
|
||||
wrapMode: TextArea.Wrap
|
||||
ScrollView {
|
||||
id: inputScrollView
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Math.min(root.height * 3/5, messageInputField.height)
|
||||
clip: true
|
||||
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
||||
|
||||
StyledTextArea { // The actual TextArea (inside ScrollView to enable scrolling)
|
||||
id: messageInputField
|
||||
anchors.fill: parent
|
||||
wrapMode: TextArea.Wrap
|
||||
padding: 10
|
||||
color: activeFocus ? Appearance.m3colors.m3onSurface : Appearance.m3colors.m3onSurfaceVariant
|
||||
placeholderText: Translation.tr('Message the model... "%1" for commands').arg(root.commandPrefix)
|
||||
@@ -686,10 +693,10 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
RippleButton { // Send button
|
||||
id: sendButton
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
Layout.rightMargin: 5
|
||||
implicitWidth: 40
|
||||
implicitHeight: 40
|
||||
|
||||
Reference in New Issue
Block a user