mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-05 02:20:28 +00:00
Latest rc5 fixes (#2492)
* Adjust the size of the new conversation tray to enlarge a bit. * Add themeable code syntax highlighting. * Change the default size to a larger context chunk for localdocs. Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
@@ -949,13 +949,35 @@ Rectangle {
|
||||
|
||||
ChatViewTextProcessor {
|
||||
id: textProcessor
|
||||
fontPixelSize: myTextArea.font.pixelSize
|
||||
}
|
||||
|
||||
function resetChatViewTextProcessor() {
|
||||
textProcessor.fontPixelSize = myTextArea.font.pixelSize
|
||||
textProcessor.codeColors.defaultColor = theme.codeDefaultColor
|
||||
textProcessor.codeColors.keywordColor = theme.codeKeywordColor
|
||||
textProcessor.codeColors.functionColor = theme.codeFunctionColor
|
||||
textProcessor.codeColors.functionCallColor = theme.codeFunctionCallColor
|
||||
textProcessor.codeColors.commentColor = theme.codeCommentColor
|
||||
textProcessor.codeColors.stringColor = theme.codeStringColor
|
||||
textProcessor.codeColors.numberColor = theme.codeNumberColor
|
||||
textProcessor.codeColors.headerColor = theme.codeHeaderColor
|
||||
textProcessor.codeColors.backgroundColor = theme.codeBackgroundColor
|
||||
textProcessor.textDocument = textDocument
|
||||
myTextArea.text = value
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
textProcessor.setLinkColor(theme.linkColor);
|
||||
textProcessor.setHeaderColor(name === qsTr("Response: ") ? theme.darkContrast : theme.lightContrast);
|
||||
textProcessor.textDocument = textDocument
|
||||
resetChatViewTextProcessor();
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: MySettings
|
||||
function onFontSizeChanged() {
|
||||
myTextArea.resetChatViewTextProcessor();
|
||||
}
|
||||
function onChatThemeChanged() {
|
||||
myTextArea.resetChatViewTextProcessor();
|
||||
}
|
||||
}
|
||||
|
||||
Accessible.role: Accessible.Paragraph
|
||||
@@ -1463,7 +1485,7 @@ Rectangle {
|
||||
id: conversationTrayButton
|
||||
anchors.bottom: textInputView.top
|
||||
anchors.horizontalCenter: textInputView.horizontalCenter
|
||||
width: 30
|
||||
width: 40
|
||||
height: 30
|
||||
visible: chatModel.count && !currentChat.isServer && currentChat.isModelLoaded
|
||||
property bool isHovered: conversationTrayMouseAreaButton.containsMouse
|
||||
@@ -1474,13 +1496,14 @@ Rectangle {
|
||||
}
|
||||
Text {
|
||||
id: conversationTrayTextButton
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.centerIn: parent
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
leftPadding: 5
|
||||
rightPadding: 5
|
||||
text: "\u00B7\u00B7\u00B7"
|
||||
color: theme.textColor
|
||||
font.pixelSize: 20 // fixed size
|
||||
font.pixelSize: 30 // fixed size
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1670,8 +1693,8 @@ Rectangle {
|
||||
anchors.right: textInputView.right
|
||||
anchors.verticalCenter: textInputView.verticalCenter
|
||||
anchors.rightMargin: 15
|
||||
imageWidth: theme.fontSizeLarger
|
||||
imageHeight: theme.fontSizeLarger
|
||||
imageWidth: theme.fontSizeLargest
|
||||
imageHeight: theme.fontSizeLargest
|
||||
visible: !currentChat.isServer && ModelList.selectableModels.count !== 0
|
||||
enabled: !currentChat.responseInProgress
|
||||
source: "qrc:/gpt4all/icons/send_message.svg"
|
||||
|
Reference in New Issue
Block a user