Skip to content

Commit

Permalink
Add Accessibility checkbox on Preferences panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Wegner authored and facchinm committed Aug 21, 2019
1 parent 5bb9f87 commit 88bda6e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/src/cc/arduino/view/preferences/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ private void initComponents() {
externalEditorBox = new javax.swing.JCheckBox();
checkUpdatesBox = new javax.swing.JCheckBox();
saveVerifyUploadBox = new javax.swing.JCheckBox();
accessibleIDEBox = new javax.swing.JCheckBox();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
scaleSpinner = new javax.swing.JSpinner();
Expand Down Expand Up @@ -281,6 +282,9 @@ public void mouseEntered(java.awt.event.MouseEvent evt) {
saveVerifyUploadBox.setText(tr("Save when verifying or uploading"));
checkboxesContainer.add(saveVerifyUploadBox);

accessibleIDEBox.setText(tr("Use accessibility features"));
checkboxesContainer.add(accessibleIDEBox);

jLabel1.setText(tr("Interface scale:"));

jLabel2.setText(tr(" (requires restart of Arduino)"));
Expand Down Expand Up @@ -713,6 +717,7 @@ private void autoScaleCheckBoxItemStateChanged(java.awt.event.ItemEvent evt) {//
private javax.swing.JCheckBox autoScaleCheckBox;
private javax.swing.JButton browseButton;
private javax.swing.JCheckBox checkUpdatesBox;
private javax.swing.JCheckBox accessibleIDEBox;
private javax.swing.JPanel checkboxesContainer;
private javax.swing.JComboBox comboLanguage;
private javax.swing.JLabel comboLanguageLabel;
Expand Down Expand Up @@ -828,6 +833,8 @@ private void savePreferencesData() {

PreferencesData.setBoolean("editor.save_on_verify", saveVerifyUploadBox.isSelected());

PreferencesData.setBoolean("ide.accessible", accessibleIDEBox.isSelected());

PreferencesData.set("boardsmanager.additional.urls", additionalBoardsManagerField.getText().replace("\r\n", "\n").replace("\r", "\n").replace("\n", ","));

PreferencesData.set(Constants.PREF_PROXY_TYPE, proxyTypeButtonGroup.getSelection().getActionCommand());
Expand Down Expand Up @@ -902,6 +909,8 @@ private void showPreferencesData() {
PreferencesData.setBoolean("editor.update_extension", true);
}

accessibleIDEBox.setSelected(PreferencesData.getBoolean("ide.accessible"));

saveVerifyUploadBox.setSelected(PreferencesData.getBoolean("editor.save_on_verify"));

additionalBoardsManagerField.setText(PreferencesData.get("boardsmanager.additional.urls"));
Expand Down

0 comments on commit 88bda6e

Please sign in to comment.