Make font size themeable.

This commit is contained in:
Adam Treat 2023-04-23 11:23:02 -04:00
parent e06cff8b48
commit 73df702abe
4 changed files with 7 additions and 6 deletions

View File

@ -55,7 +55,7 @@ Window {
anchors.top: modelLabel.top anchors.top: modelLabel.top
anchors.bottom: modelLabel.bottom anchors.bottom: modelLabel.bottom
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 24 font.pixelSize: theme.fontSizeLarge
spacing: 0 spacing: 0
model: LLM.modelList model: LLM.modelList
Accessible.role: Accessible.ComboBox Accessible.role: Accessible.ComboBox
@ -77,7 +77,7 @@ Window {
contentItem: Text { contentItem: Text {
text: modelData text: modelData
color: theme.textColor color: theme.textColor
font: control.font font: comboBox.font
elide: Text.ElideRight elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
} }
@ -612,7 +612,7 @@ Window {
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
focus: false focus: false
readOnly: true readOnly: true
font.pixelSize: 24 font.pixelSize: theme.fontSizeLarge
cursorVisible: currentResponse ? (LLM.response !== "" ? LLM.responseInProgress : false) : false cursorVisible: currentResponse ? (LLM.response !== "" ? LLM.responseInProgress : false) : false
cursorPosition: text.length cursorPosition: text.length
background: Rectangle { background: Rectangle {
@ -841,7 +841,7 @@ Window {
color: theme.textColor color: theme.textColor
padding: 20 padding: 20
enabled: LLM.isModelLoaded enabled: LLM.isModelLoaded
font.pixelSize: 24 font.pixelSize: theme.fontSizeLarge
placeholderText: qsTr("Send a message...") placeholderText: qsTr("Send a message...")
placeholderTextColor: theme.backgroundLightest placeholderTextColor: theme.backgroundLightest
background: Rectangle { background: Rectangle {

View File

@ -87,7 +87,7 @@ NOTE: By turning on this feature, you will be sending your data to the GPT4All O
padding: 20 padding: 20
width: parent.width width: parent.width
text: settings.attribution text: settings.attribution
font.pixelSize: 24 font.pixelSize: theme.fontSizeLarge
placeholderText: qsTr("Please provide a name for attribution (optional)") placeholderText: qsTr("Please provide a name for attribution (optional)")
placeholderTextColor: theme.backgroundLightest placeholderTextColor: theme.backgroundLightest
background: Rectangle { background: Rectangle {

View File

@ -12,4 +12,5 @@ QtObject {
property color dialogBorder: "#d1d5db" property color dialogBorder: "#d1d5db"
property color userColor: "#ec86bf" property color userColor: "#ec86bf"
property color assistantColor: "#10a37f" property color assistantColor: "#10a37f"
property real fontSizeLarge: 24
} }

View File

@ -55,7 +55,7 @@ Dialog {
width: parent.width width: parent.width
height: 300 height: 300
wrapMode: Text.Wrap wrapMode: Text.Wrap
font.pixelSize: 24 font.pixelSize: theme.fontSizeLarge
placeholderText: qsTr("Please provide a better response...") placeholderText: qsTr("Please provide a better response...")
placeholderTextColor: theme.backgroundLightest placeholderTextColor: theme.backgroundLightest
background: Rectangle { background: Rectangle {