mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-09 04:20:42 +00:00
chat: major UI redesign for v3.0.0 (#2396)
Signed-off-by: Adam Treat <treat.adam@gmail.com> Signed-off-by: Jared Van Bortel <jared@nomic.ai> Co-authored-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
@@ -8,12 +8,9 @@ Item {
|
||||
id: root
|
||||
property string title: ""
|
||||
property Item contentItem: null
|
||||
property Item advancedSettings: null
|
||||
property bool showAdvancedSettingsButton: true
|
||||
property bool showRestoreDefaultsButton: true
|
||||
property var openFolderDialog
|
||||
signal restoreDefaultsClicked
|
||||
signal downloadClicked
|
||||
|
||||
onContentItemChanged: function() {
|
||||
if (contentItem) {
|
||||
@@ -23,14 +20,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
onAdvancedSettingsChanged: function() {
|
||||
if (advancedSettings) {
|
||||
advancedSettings.parent = advancedInner;
|
||||
advancedSettings.anchors.left = advancedInner.left;
|
||||
advancedSettings.anchors.right = advancedInner.right;
|
||||
}
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
id: scrollView
|
||||
width: parent.width
|
||||
@@ -61,14 +50,9 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Column {
|
||||
id: advancedInner
|
||||
visible: false
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
height: restoreDefaultsButton.height
|
||||
MySettingsButton {
|
||||
id: restoreDefaultsButton
|
||||
@@ -84,20 +68,6 @@ Item {
|
||||
root.restoreDefaultsClicked();
|
||||
}
|
||||
}
|
||||
MySettingsButton {
|
||||
id: advancedSettingsButton
|
||||
anchors.right: parent.right
|
||||
visible: root.advancedSettings && showAdvancedSettingsButton
|
||||
width: implicitWidth
|
||||
text: !advancedInner.visible ? qsTr("Advanced Settings") : qsTr("Hide Advanced Settings")
|
||||
font.pixelSize: theme.fontSizeLarge
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Shows/hides the advanced settings")
|
||||
onClicked: {
|
||||
advancedInner.visible = !advancedInner.visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user