Fix regression in checked of db and network.

This commit is contained in:
Adam Treat 2023-06-13 20:08:27 -04:00
parent c4319d2c8e
commit 8953b7f6a6
2 changed files with 4 additions and 5 deletions

View File

@ -305,8 +305,7 @@ Window {
height: 40
z: 200
padding: 15
checkable: true
checked: Network.isActive
toggled: Network.isActive
source: "qrc:/gpt4all/icons/network.svg"
Accessible.name: qsTr("Network button")
Accessible.description: qsTr("Reveals a dialogue where you can opt-in for sharing data over network")
@ -342,8 +341,7 @@ Window {
height: 40
z: 200
padding: 15
checkable: true
checked: currentChat.collectionList.length
toggled: currentChat.collectionList.length
source: "qrc:/gpt4all/icons/db.svg"
Accessible.name: qsTr("Add collections of documents to the chat")
Accessible.description: qsTr("Provides a button to add collections of documents to the chat")

View File

@ -7,6 +7,7 @@ import Qt5Compat.GraphicalEffects
Button {
id: myButton
padding: 10
property bool toggled: false
property alias source: image.source
contentItem: Text {
text: myButton.text
@ -21,7 +22,7 @@ Button {
Rectangle {
anchors.fill: parent
color: "transparent"
visible: myButton.checkable && myButton.checked
visible: myButton.toggled
border.color: theme.backgroundLightest
border.width: 1
radius: 10