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:
AT
2024-06-24 18:49:23 -04:00
committed by GitHub
parent 1272b694ae
commit 9273b49b62
111 changed files with 8540 additions and 7879 deletions

View File

@@ -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;
}
}
}
}
}