add missing accessible props for buttons, remove forgotten duplicate accessible props

This commit is contained in:
Justin Wang 2023-05-23 17:37:55 +02:00 committed by AT
parent fc76760f7a
commit 57852bfb9c
2 changed files with 6 additions and 8 deletions

View File

@ -649,6 +649,9 @@ Window {
anchors.fill: parent
source: "qrc:/gpt4all/icons/thumbs_up.svg"
}
Accessible.role = Accessible.Button
Accessible.name = qsTr("Thumbs up")
Accessible.description = qsTr("Updates response and chatModel state for thumbs up")
onClicked: {
if (thumbsUpState && !thumbsDownState)
return
@ -682,6 +685,9 @@ Window {
anchors.fill: parent
source: "qrc:/gpt4all/icons/thumbs_down.svg"
}
Accessible.role = Accessible.Button
Accessible.name = qsTr("Thumbs down")
Accessible.description = qsTr("Opens thumbs down dialog")
onClicked: {
thumbsDownDialog.open()
}

View File

@ -38,8 +38,6 @@ Drawer {
anchors.right: parent.right
font.pixelSize: theme.fontSizeLarger
text: qsTr("New chat")
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: qsTr("Use this to launch an external application that will check for updates to the installer")
onClicked: {
LLM.chatListModel.addChat();
@ -257,8 +255,6 @@ Drawer {
anchors.bottom: downloadButton.top
anchors.bottomMargin: 10
text: qsTr("Updates")
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: qsTr("Use this to launch an external application that will check for updates to the installer")
onClicked: {
if (!LLM.checkForUpdates())
@ -273,8 +269,6 @@ Drawer {
anchors.bottom: aboutButton.top
anchors.bottomMargin: 10
text: qsTr("Downloads")
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: qsTr("Use this to launch a dialog to download new models")
onClicked: {
downloadClicked()
@ -287,8 +281,6 @@ Drawer {
anchors.right: parent.right
anchors.bottom: parent.bottom
text: qsTr("About")
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: qsTr("Use this to launch a dialog to show the about page")
onClicked: {
aboutClicked()