mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-02 09:40:42 +00:00
dedup qml: move accessible properties to MyButton
This commit is contained in:
parent
d22f9242d7
commit
fc76760f7a
@ -234,12 +234,10 @@ Dialog {
|
||||
text: "Remove"
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 20
|
||||
Accessible.description: qsTr("Remove button to remove model from filesystem")
|
||||
onClicked: {
|
||||
Download.removeModel(modelData.filename);
|
||||
}
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: qsTr("Remove button")
|
||||
Accessible.description: qsTr("Remove button to remove model from filesystem")
|
||||
}
|
||||
}
|
||||
|
||||
@ -298,6 +296,7 @@ Dialog {
|
||||
anchors.topMargin: 15
|
||||
anchors.rightMargin: 20
|
||||
visible: !modelData.isChatGPT && !modelData.installed && !modelData.calcHash
|
||||
Accessible.description: qsTr("Cancel/Download button to stop/start the download")
|
||||
onClicked: {
|
||||
if (!downloading) {
|
||||
downloading = true;
|
||||
@ -307,9 +306,6 @@ Dialog {
|
||||
Download.cancelDownload(modelData.filename);
|
||||
}
|
||||
}
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Cancel/Download button to stop/start the download")
|
||||
}
|
||||
}
|
||||
|
||||
@ -420,8 +416,6 @@ Dialog {
|
||||
}
|
||||
MyButton {
|
||||
text: qsTr("Browse")
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Opens a folder picker dialog to choose where to save model files")
|
||||
onClicked: modelPathDialog.open()
|
||||
}
|
||||
|
@ -20,4 +20,6 @@ Button {
|
||||
radius: 10
|
||||
color: theme.backgroundLight
|
||||
}
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
}
|
@ -119,15 +119,11 @@ NOTE: By turning on this feature, you will be sending your data to the GPT4All O
|
||||
spacing: 10
|
||||
MyButton {
|
||||
text: qsTr("Enable")
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Enable opt-in button")
|
||||
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
||||
}
|
||||
MyButton {
|
||||
text: qsTr("Cancel")
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Cancel opt-in button")
|
||||
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ Dialog {
|
||||
anchors.verticalCenter: label.verticalCenter
|
||||
padding: 20
|
||||
text: qsTr("Update")
|
||||
Accessible.description: qsTr("Update to new version")
|
||||
onClicked: {
|
||||
if (!LLM.checkForUpdates())
|
||||
checkForUpdatesError.open()
|
||||
|
@ -530,8 +530,6 @@ Dialog {
|
||||
Layout.column: 1
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Restore Defaults")
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Restores the settings dialog to a default state")
|
||||
onClicked: {
|
||||
settingsDialog.restoreGenerationDefaults()
|
||||
@ -646,8 +644,6 @@ Dialog {
|
||||
Layout.row: 2
|
||||
Layout.column: 2
|
||||
text: qsTr("Browse")
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Opens a folder picker dialog to choose where to save model files")
|
||||
onClicked: modelPathDialog.open()
|
||||
}
|
||||
@ -747,8 +743,6 @@ Dialog {
|
||||
Layout.column: 1
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Restore Defaults")
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Restores the settings dialog to a default state")
|
||||
onClicked: {
|
||||
settingsDialog.restoreApplicationDefaults()
|
||||
|
@ -79,15 +79,11 @@ Dialog {
|
||||
spacing: 10
|
||||
MyButton {
|
||||
text: qsTr("Submit")
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Submits the user's response")
|
||||
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
||||
}
|
||||
MyButton {
|
||||
text: qsTr("Cancel")
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Closes the response dialog")
|
||||
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user