diff --git a/gpt4all-chat/main.qml b/gpt4all-chat/main.qml
index 6a1eac12..c482822f 100644
--- a/gpt4all-chat/main.qml
+++ b/gpt4all-chat/main.qml
@@ -313,6 +313,7 @@ Window {
Label {
anchors.verticalCenter: parent.verticalCenter
text: qsTr("Loading model...")
+ font.pixelSize: theme.fontSizeLarge
color: theme.textAccent
}
}
@@ -471,18 +472,21 @@ Window {
id: copyMessage
anchors.centerIn: parent
text: qsTr("Conversation copied to clipboard.")
+ font.pixelSize: theme.fontSizeLarge
}
PopupDialog {
id: copyCodeMessage
anchors.centerIn: parent
text: qsTr("Code copied to clipboard.")
+ font.pixelSize: theme.fontSizeLarge
}
PopupDialog {
id: healthCheckFailed
anchors.centerIn: parent
text: qsTr("Connection to datalake failed.")
+ font.pixelSize: theme.fontSizeLarge
}
PopupDialog {
@@ -491,6 +495,7 @@ Window {
shouldTimeOut: false
shouldShowBusy: true
text: qsTr("Recalculating context.")
+ font.pixelSize: theme.fontSizeLarge
Connections {
target: currentChat
@@ -509,6 +514,7 @@ Window {
shouldTimeOut: false
shouldShowBusy: true
text: qsTr("Saving chats.")
+ font.pixelSize: theme.fontSizeLarge
}
MyToolButton {
@@ -614,6 +620,7 @@ Window {
If you can't start it manually, then I'm afraid you'll have to
reinstall.")
color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
Accessible.role: Accessible.Dialog
Accessible.name: text
Accessible.description: qsTr("Dialog indicating an error")
@@ -685,6 +692,7 @@ Window {
id: warningLabel
text: qsTr("You must install a model to continue. Models are available via the download dialog or you can install them manually by downloading from the GPT4All website (look for the Models Explorer) and placing them in the model folder. The model folder can be found in the settings dialog under the application tab.")
color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
width: 600
linkColor: theme.linkColor
wrapMode: Text.WordWrap
@@ -1005,6 +1013,7 @@ Window {
anchors.rightMargin: 30
color: theme.mutedTextColor
text: currentChat.tokenSpeed
+ font.pixelSize: theme.fontSizeLarge
}
RectangularGlow {
diff --git a/gpt4all-chat/mysettings.cpp b/gpt4all-chat/mysettings.cpp
index 80191d43..4c9e6e26 100644
--- a/gpt4all-chat/mysettings.cpp
+++ b/gpt4all-chat/mysettings.cpp
@@ -17,6 +17,7 @@ static bool default_forceMetal = false;
static QString default_lastVersionStarted = "";
static int default_localDocsChunkSize = 256;
static QString default_chatTheme = "Dark";
+static QString default_fontSize = "Small";
static int default_localDocsRetrievalSize = 3;
static bool default_localDocsShowReferences = true;
static QString default_networkAttribution = "";
@@ -493,6 +494,24 @@ void MySettings::setChatTheme(const QString &u)
emit chatThemeChanged();
}
+QString MySettings::fontSize() const
+{
+ QSettings setting;
+ setting.sync();
+ return setting.value("fontSize", default_fontSize).toString();
+}
+
+void MySettings::setFontSize(const QString &u)
+{
+ if(fontSize() == u)
+ return;
+
+ QSettings setting;
+ setting.setValue("fontSize", u);
+ setting.sync();
+ emit fontSizeChanged();
+}
+
bool MySettings::forceMetal() const
{
return m_forceMetal;
diff --git a/gpt4all-chat/mysettings.h b/gpt4all-chat/mysettings.h
index bd278b11..7d77ede0 100644
--- a/gpt4all-chat/mysettings.h
+++ b/gpt4all-chat/mysettings.h
@@ -16,6 +16,7 @@ class MySettings : public QObject
Q_PROPERTY(QString modelPath READ modelPath WRITE setModelPath NOTIFY modelPathChanged)
Q_PROPERTY(QString userDefaultModel READ userDefaultModel WRITE setUserDefaultModel NOTIFY userDefaultModelChanged)
Q_PROPERTY(QString chatTheme READ chatTheme WRITE setChatTheme NOTIFY chatThemeChanged)
+ Q_PROPERTY(QString fontSize READ fontSize WRITE setFontSize NOTIFY fontSizeChanged)
Q_PROPERTY(bool forceMetal READ forceMetal WRITE setForceMetal NOTIFY forceMetalChanged)
Q_PROPERTY(QString lastVersionStarted READ lastVersionStarted WRITE setLastVersionStarted NOTIFY lastVersionStartedChanged)
Q_PROPERTY(int localDocsChunkSize READ localDocsChunkSize WRITE setLocalDocsChunkSize NOTIFY localDocsChunkSizeChanged)
@@ -73,6 +74,8 @@ public:
void setUserDefaultModel(const QString &u);
QString chatTheme() const;
void setChatTheme(const QString &u);
+ QString fontSize() const;
+ void setFontSize(const QString &u);
bool forceMetal() const;
void setForceMetal(bool b);
@@ -118,6 +121,7 @@ Q_SIGNALS:
void modelPathChanged();
void userDefaultModelChanged();
void chatThemeChanged();
+ void fontSizeChanged();
void forceMetalChanged(bool);
void lastVersionStartedChanged();
void localDocsChunkSizeChanged();
diff --git a/gpt4all-chat/qml/AboutDialog.qml b/gpt4all-chat/qml/AboutDialog.qml
index a4552509..a3ce20da 100644
--- a/gpt4all-chat/qml/AboutDialog.qml
+++ b/gpt4all-chat/qml/AboutDialog.qml
@@ -39,6 +39,7 @@ MyDialog {
anchors.leftMargin: 30
anchors.verticalCenter: img.verticalCenter
text: qsTr("About GPT4All")
+ font.pixelSize: theme.fontSizeLarger
color: theme.textColor
}
}
@@ -61,6 +62,7 @@ MyDialog {
+ qsTr("### Contributors\n")
+ Download.releaseInfo.contributors
color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
focus: false
readOnly: true
Accessible.role: Accessible.Paragraph
@@ -79,6 +81,7 @@ MyDialog {
textFormat: Text.StyledText
wrapMode: Text.WordWrap
text: qsTr("Check out our discord channel https://discord.gg/4M2QFmTt2k")
+ font.pixelSize: theme.fontSizeLarge
onLinkActivated: { Qt.openUrlExternally("https://discord.gg/4M2QFmTt2k") }
color: theme.textColor
linkColor: theme.linkColor
@@ -93,6 +96,7 @@ MyDialog {
textFormat: Text.StyledText
wrapMode: Text.WordWrap
text: qsTr("Thank you to Nomic AI and the community for contributing so much great data, code, ideas, and energy to the growing open source AI ecosystem!")
+ font.pixelSize: theme.fontSizeLarge
onLinkActivated: { Qt.openUrlExternally("https://home.nomic.ai") }
color: theme.textColor
linkColor: theme.linkColor
diff --git a/gpt4all-chat/qml/ApplicationSettings.qml b/gpt4all-chat/qml/ApplicationSettings.qml
index 44cc4531..90408fca 100644
--- a/gpt4all-chat/qml/ApplicationSettings.qml
+++ b/gpt4all-chat/qml/ApplicationSettings.qml
@@ -22,6 +22,7 @@ MySettingsTab {
id: themeLabel
text: qsTr("Theme:")
color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
Layout.row: 1
Layout.column: 0
}
@@ -35,7 +36,7 @@ MySettingsTab {
model: ["Dark", "Light"]
Accessible.role: Accessible.ComboBox
Accessible.name: qsTr("ComboBox for displaying/picking the color theme")
- Accessible.description: qsTr("Use this for picking the color them for the chat client to use")
+ Accessible.description: qsTr("Use this for picking the color theme for the chat client to use")
function updateModel() {
themeBox.currentIndex = themeBox.indexOfValue(MySettings.chatTheme);
}
@@ -52,16 +53,52 @@ MySettingsTab {
MySettings.chatTheme = themeBox.currentText
}
}
+ Label {
+ id: fontLabel
+ text: qsTr("Font Size:")
+ color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
+ Layout.row: 2
+ Layout.column: 0
+ }
+ MyComboBox {
+ id: fontBox
+ Layout.row: 2
+ Layout.column: 1
+ Layout.columnSpan: 1
+ Layout.minimumWidth: 100
+ Layout.fillWidth: false
+ model: ["Small", "Medium", "Large"]
+ Accessible.role: Accessible.ComboBox
+ Accessible.name: qsTr("ComboBox for displaying/picking the font size")
+ Accessible.description: qsTr("Use this for picking the font size of the chat client")
+ function updateModel() {
+ fontBox.currentIndex = fontBox.indexOfValue(MySettings.fontSize);
+ }
+ Component.onCompleted: {
+ fontBox.updateModel()
+ }
+ Connections {
+ target: MySettings
+ function onFontSizeChanged() {
+ fontBox.updateModel()
+ }
+ }
+ onActivated: {
+ MySettings.fontSize = fontBox.currentText
+ }
+ }
Label {
id: defaultModelLabel
text: qsTr("Default model:")
color: theme.textColor
- Layout.row: 2
+ font.pixelSize: theme.fontSizeLarge
+ Layout.row: 3
Layout.column: 0
}
MyComboBox {
id: comboBox
- Layout.row: 2
+ Layout.row: 3
Layout.column: 1
Layout.columnSpan: 2
Layout.minimumWidth: 350
@@ -90,14 +127,16 @@ MySettingsTab {
id: modelPathLabel
text: qsTr("Download path:")
color: theme.textColor
- Layout.row: 3
+ font.pixelSize: theme.fontSizeLarge
+ Layout.row: 4
Layout.column: 0
}
MyDirectoryField {
id: modelPathDisplayField
text: MySettings.modelPath
+ font.pixelSize: theme.fontSizeLarge
implicitWidth: 300
- Layout.row: 3
+ Layout.row: 4
Layout.column: 1
Layout.fillWidth: true
ToolTip.text: qsTr("Path where model files will be downloaded to")
@@ -114,7 +153,7 @@ MySettingsTab {
}
}
MyButton {
- Layout.row: 3
+ Layout.row: 4
Layout.column: 2
text: qsTr("Browse")
Accessible.description: qsTr("Opens a folder picker dialog to choose where to save model files")
@@ -128,15 +167,17 @@ MySettingsTab {
id: nThreadsLabel
text: qsTr("CPU Threads:")
color: theme.textColor
- Layout.row: 4
+ font.pixelSize: theme.fontSizeLarge
+ Layout.row: 5
Layout.column: 0
}
MyTextField {
text: MySettings.threadCount
color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
ToolTip.text: qsTr("Amount of processing threads to use bounded by 1 and number of logical processors")
ToolTip.visible: hovered
- Layout.row: 4
+ Layout.row: 5
Layout.column: 1
validator: IntValidator {
bottom: 1
@@ -158,12 +199,13 @@ MySettingsTab {
id: saveChatsLabel
text: qsTr("Save chats to disk:")
color: theme.textColor
- Layout.row: 5
+ font.pixelSize: theme.fontSizeLarge
+ Layout.row: 6
Layout.column: 0
}
MyCheckBox {
id: saveChatsBox
- Layout.row: 5
+ Layout.row: 6
Layout.column: 1
checked: MySettings.saveChats
onClicked: {
@@ -177,12 +219,13 @@ MySettingsTab {
id: saveChatGPTChatsLabel
text: qsTr("Save ChatGPT chats to disk:")
color: theme.textColor
- Layout.row: 6
+ font.pixelSize: theme.fontSizeLarge
+ Layout.row: 7
Layout.column: 0
}
MyCheckBox {
id: saveChatGPTChatsBox
- Layout.row: 6
+ Layout.row: 7
Layout.column: 1
checked: MySettings.saveChatGPTChats
onClicked: {
@@ -193,12 +236,13 @@ MySettingsTab {
id: serverChatLabel
text: qsTr("Enable API server:")
color: theme.textColor
- Layout.row: 7
+ font.pixelSize: theme.fontSizeLarge
+ Layout.row: 8
Layout.column: 0
}
MyCheckBox {
id: serverChatBox
- Layout.row: 7
+ Layout.row: 8
Layout.column: 1
checked: MySettings.serverChat
onClicked: {
@@ -208,7 +252,7 @@ MySettingsTab {
ToolTip.visible: hovered
}
Rectangle {
- Layout.row: 8
+ Layout.row: 9
Layout.column: 0
Layout.columnSpan: 3
Layout.fillWidth: true
@@ -232,6 +276,7 @@ MySettingsTab {
id: gpuOverrideLabel
text: qsTr("Force Metal (macOS+arm):")
color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
Layout.row: 1
Layout.column: 0
}
diff --git a/gpt4all-chat/qml/ChatDrawer.qml b/gpt4all-chat/qml/ChatDrawer.qml
index c3e31237..b13acb65 100644
--- a/gpt4all-chat/qml/ChatDrawer.qml
+++ b/gpt4all-chat/qml/ChatDrawer.qml
@@ -255,6 +255,7 @@ Drawer {
anchors.bottom: downloadButton.top
anchors.bottomMargin: 10
text: qsTr("Updates")
+ font.pixelSize: theme.fontSizeLarge
Accessible.description: qsTr("Use this to launch an external application that will check for updates to the installer")
onClicked: {
if (!LLM.checkForUpdates())
diff --git a/gpt4all-chat/qml/CollectionsDialog.qml b/gpt4all-chat/qml/CollectionsDialog.qml
index 76001254..095c20b0 100644
--- a/gpt4all-chat/qml/CollectionsDialog.qml
+++ b/gpt4all-chat/qml/CollectionsDialog.qml
@@ -22,6 +22,7 @@ MyDialog {
anchors.top: parent.top
anchors.left: parent.left
text: "Available LocalDocs Collections:"
+ font.pixelSize: theme.fontSizeLarge
color: theme.textColor
}
@@ -69,6 +70,7 @@ MyDialog {
anchors.left: checkBox.right
anchors.margins: 20
text: collection
+ font.pixelSize: theme.fontSizeLarge
elide: Text.ElideRight
color: theme.textColor
}
diff --git a/gpt4all-chat/qml/LocalDocsSettings.qml b/gpt4all-chat/qml/LocalDocsSettings.qml
index a1719230..d833d3fe 100644
--- a/gpt4all-chat/qml/LocalDocsSettings.qml
+++ b/gpt4all-chat/qml/LocalDocsSettings.qml
@@ -35,6 +35,7 @@ MySettingsTab {
width: 225
horizontalAlignment: Text.AlignJustify
color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
placeholderText: qsTr("Collection name...")
placeholderTextColor: theme.mutedTextColor
ToolTip.text: qsTr("Name of the collection to add (Required)")
@@ -55,6 +56,7 @@ MySettingsTab {
Layout.fillWidth: true
text: root.folder_path
placeholderText: qsTr("Folder path...")
+ font.pixelSize: theme.fontSizeLarge
placeholderTextColor: theme.mutedTextColor
ToolTip.text: qsTr("Folder path to documents (Required)")
ToolTip.visible: hovered
@@ -122,6 +124,7 @@ MySettingsTab {
text: collection
elide: Text.ElideRight
color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
width: 200
}
@@ -134,6 +137,7 @@ MySettingsTab {
text: folder_path
elide: Text.ElideRight
color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
}
Item {
@@ -168,6 +172,7 @@ MySettingsTab {
id: showReferencesLabel
text: qsTr("Show references:")
color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
}
MyCheckBox {
id: showReferencesBox
@@ -206,6 +211,7 @@ MySettingsTab {
Layout.row: 1
Layout.column: 0
color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
text: qsTr("Document snippet size (characters):")
}
@@ -235,6 +241,7 @@ MySettingsTab {
Layout.row: 2
Layout.column: 0
color: theme.textColor
+ font.pixelSize: theme.fontSizeLarge
text: qsTr("Document snippets per prompt:")
}
diff --git a/gpt4all-chat/qml/ModelDownloaderDialog.qml b/gpt4all-chat/qml/ModelDownloaderDialog.qml
index 5100c449..6172c019 100644
--- a/gpt4all-chat/qml/ModelDownloaderDialog.qml
+++ b/gpt4all-chat/qml/ModelDownloaderDialog.qml
@@ -35,6 +35,7 @@ MyDialog {
Label {
id: listLabel
text: qsTr("Available Models:")
+ font.pixelSize: theme.fontSizeLarge
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
color: theme.textColor
@@ -47,6 +48,7 @@ MyDialog {
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
text: qsTr("Network error: could not retrieve http://gpt4all.io/models/models.json")
+ font.pixelSize: theme.fontSizeLarge
color: theme.mutedTextColor
}
@@ -84,6 +86,7 @@ MyDialog {
Text {
textFormat: Text.StyledText
text: "