From 8953b7f6a6d09d91adfa09788af41f91d2a8ddd3 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Tue, 13 Jun 2023 20:08:27 -0400 Subject: [PATCH] Fix regression in checked of db and network. --- gpt4all-chat/main.qml | 6 ++---- gpt4all-chat/qml/MyToolButton.qml | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gpt4all-chat/main.qml b/gpt4all-chat/main.qml index aec76bb0..5946073b 100644 --- a/gpt4all-chat/main.qml +++ b/gpt4all-chat/main.qml @@ -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") diff --git a/gpt4all-chat/qml/MyToolButton.qml b/gpt4all-chat/qml/MyToolButton.qml index 95755837..2699efb5 100644 --- a/gpt4all-chat/qml/MyToolButton.qml +++ b/gpt4all-chat/qml/MyToolButton.qml @@ -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