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 height: 40
z: 200 z: 200
padding: 15 padding: 15
checkable: true toggled: Network.isActive
checked: Network.isActive
source: "qrc:/gpt4all/icons/network.svg" source: "qrc:/gpt4all/icons/network.svg"
Accessible.name: qsTr("Network button") Accessible.name: qsTr("Network button")
Accessible.description: qsTr("Reveals a dialogue where you can opt-in for sharing data over network") Accessible.description: qsTr("Reveals a dialogue where you can opt-in for sharing data over network")
@ -342,8 +341,7 @@ Window {
height: 40 height: 40
z: 200 z: 200
padding: 15 padding: 15
checkable: true toggled: currentChat.collectionList.length
checked: currentChat.collectionList.length
source: "qrc:/gpt4all/icons/db.svg" source: "qrc:/gpt4all/icons/db.svg"
Accessible.name: qsTr("Add collections of documents to the chat") Accessible.name: qsTr("Add collections of documents to the chat")
Accessible.description: qsTr("Provides a button to 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 { Button {
id: myButton id: myButton
padding: 10 padding: 10
property bool toggled: false
property alias source: image.source property alias source: image.source
contentItem: Text { contentItem: Text {
text: myButton.text text: myButton.text
@ -21,7 +22,7 @@ Button {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: "transparent" color: "transparent"
visible: myButton.checkable && myButton.checked visible: myButton.toggled
border.color: theme.backgroundLightest border.color: theme.backgroundLightest
border.width: 1 border.width: 1
radius: 10 radius: 10