Skip to content

Commit

Permalink
Add a button to the collections dialog. Fix close button.
Browse files Browse the repository at this point in the history
  • Loading branch information
manyoso committed Nov 22, 2023
1 parent e4ff972 commit a328f9e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
4 changes: 4 additions & 0 deletions gpt4all-chat/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ Window {
CollectionsDialog {
id: collectionsDialog
anchors.centerIn: parent
onAddRemoveClicked: {
settingsDialog.pageToDisplay = 2;
settingsDialog.open();
}
}

MyToolButton {
Expand Down
15 changes: 14 additions & 1 deletion gpt4all-chat/qml/CollectionsDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ MyDialog {
width: 480
height: 640

signal addRemoveClicked
property var currentChat: ChatListModel.currentChat

Label {
Expand All @@ -30,7 +31,8 @@ MyDialog {
id: scrollView
anchors.top: listLabel.bottom
anchors.topMargin: 20
anchors.bottom: parent.bottom
anchors.bottom: collectionSettings.top
anchors.bottomMargin: 20
anchors.left: parent.left
anchors.right: parent.right
clip: true
Expand Down Expand Up @@ -120,4 +122,15 @@ MyDialog {
}
}
}

MyButton {
id: collectionSettings
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Add & Remove")
font.pixelSize: theme.fontSizeLarger
onClicked: {
addRemoveClicked()
}
}
}
9 changes: 9 additions & 0 deletions gpt4all-chat/qml/MyDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ Dialog {
radius: 10
}

Rectangle {
id: closeBackground
z: 299
anchors.centerIn: myCloseButton
width: myCloseButton.width + 10
height: myCloseButton.height + 10
color: theme.backgroundDarkest
}

MyToolButton {
id: myCloseButton
x: 0 + myDialog.width - myDialog.padding - width - 15
Expand Down
1 change: 1 addition & 0 deletions gpt4all-chat/qml/SettingsDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ MyDialog {
}

signal downloadClicked
property alias pageToDisplay: listView.currentIndex

Item {
Accessible.role: Accessible.Dialog
Expand Down

0 comments on commit a328f9e

Please sign in to comment.