mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-27 15:58:25 +00:00
Use a fixed minimum height to ensure the top three model cards have the same height.
Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
parent
563e6592e4
commit
51c45e5d47
@ -47,7 +47,7 @@ ColumnLayout {
|
|||||||
columnSpacing: 20
|
columnSpacing: 20
|
||||||
RemoteModelCard {
|
RemoteModelCard {
|
||||||
Layout.preferredWidth: 600
|
Layout.preferredWidth: 600
|
||||||
Layout.minimumHeight: implicitHeight
|
Layout.minimumHeight: 700
|
||||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||||
providerBaseUrl: "https://api.groq.com/openai/v1/"
|
providerBaseUrl: "https://api.groq.com/openai/v1/"
|
||||||
providerName: qsTr("Groq")
|
providerName: qsTr("Groq")
|
||||||
@ -56,7 +56,7 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
RemoteModelCard {
|
RemoteModelCard {
|
||||||
Layout.preferredWidth: 600
|
Layout.preferredWidth: 600
|
||||||
Layout.minimumHeight: implicitHeight
|
Layout.minimumHeight: 700
|
||||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||||
providerBaseUrl: "https://api.openai.com/v1/"
|
providerBaseUrl: "https://api.openai.com/v1/"
|
||||||
providerName: qsTr("OpenAI")
|
providerName: qsTr("OpenAI")
|
||||||
@ -65,7 +65,7 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
RemoteModelCard {
|
RemoteModelCard {
|
||||||
Layout.preferredWidth: 600
|
Layout.preferredWidth: 600
|
||||||
Layout.minimumHeight: implicitHeight
|
Layout.minimumHeight: 700
|
||||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||||
providerBaseUrl: "https://api.mistral.ai/v1/"
|
providerBaseUrl: "https://api.mistral.ai/v1/"
|
||||||
providerName: qsTr("Mistral")
|
providerName: qsTr("Mistral")
|
||||||
@ -74,7 +74,7 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
RemoteModelCard {
|
RemoteModelCard {
|
||||||
Layout.preferredWidth: 600
|
Layout.preferredWidth: 600
|
||||||
Layout.minimumHeight: implicitHeight
|
Layout.minimumHeight: 700
|
||||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||||
providerIsCustom: true
|
providerIsCustom: true
|
||||||
providerName: qsTr("Custom")
|
providerName: qsTr("Custom")
|
||||||
|
@ -28,9 +28,10 @@ Rectangle {
|
|||||||
radius: 10
|
radius: 10
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: theme.controlBorder
|
border.color: theme.controlBorder
|
||||||
implicitHeight: childrenRect.height + 40
|
implicitHeight: topColumn.height + bottomColumn.height + 60
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
id: topColumn
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
@ -73,6 +74,15 @@ Rectangle {
|
|||||||
id: providerDescLabel
|
id: providerDescLabel
|
||||||
onLinkActivated: function(link) { Qt.openUrlExternally(link) }
|
onLinkActivated: function(link) { Qt.openUrlExternally(link) }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: bottomColumn
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.margins: 20
|
||||||
|
spacing: 30
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
MySettingsLabel {
|
MySettingsLabel {
|
||||||
@ -113,15 +123,15 @@ Rectangle {
|
|||||||
color: theme.settingsTitleTextColor
|
color: theme.settingsTitleTextColor
|
||||||
}
|
}
|
||||||
MyTextField {
|
MyTextField {
|
||||||
id: baseUrl
|
id: baseUrlField
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
function showError() {
|
function showError() {
|
||||||
messageToast.show(qsTr("ERROR: $BASE_URL is empty."));
|
messageToast.show(qsTr("ERROR: $BASE_URL is empty."));
|
||||||
baseUrl.placeholderTextColor = theme.textErrorColor;
|
baseUrlField.placeholderTextColor = theme.textErrorColor;
|
||||||
}
|
}
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
baseUrl.placeholderTextColor = theme.mutedTextColor;
|
baseUrlField.placeholderTextColor = theme.mutedTextColor;
|
||||||
}
|
}
|
||||||
placeholderText: qsTr("enter $BASE_URL")
|
placeholderText: qsTr("enter $BASE_URL")
|
||||||
Accessible.role: Accessible.EditableText
|
Accessible.role: Accessible.EditableText
|
||||||
|
Loading…
Reference in New Issue
Block a user