show/hide "requires restart" for hidpiDisableBox in prefs

This commit is contained in:
Ben Fry
2022-05-02 08:14:42 -04:00
parent 41f9240bf4
commit 91256a6742
2 changed files with 9 additions and 7 deletions
@@ -75,6 +75,7 @@ public class PreferencesFrame {
JLabel zoomRestartLabel;
JCheckBox hidpiDisableBox;
JLabel hidpiRestartLabel;
JCheckBox syncSketchNameBox;
JComboBox<String> displaySelectionBox;
@@ -212,8 +213,11 @@ public class PreferencesFrame {
// [ ] Disable HiDPI Scaling (requires restart)
hidpiDisableBox = new JCheckBox("Disable HiDPI Scaling (requires restart)");
hidpiDisableBox = new JCheckBox("Disable HiDPI Scaling");
// hidpiDisableBox.setVisible(false); // only for Windows
hidpiRestartLabel = new JLabel(Language.text("preferences.requires_restart"));
hidpiRestartLabel.setVisible(false);
hidpiDisableBox.addChangeListener(e -> hidpiRestartLabel.setVisible(hidpiDisableBox.isSelected() != Splash.getDisableHiDPI()));
// [ ] Keep sketch name and main tab name in sync
@@ -452,27 +456,25 @@ public class PreferencesFrame {
addRow(axis, zoomLabel, zoomAutoBox, zoomSelectionBox, zoomRestartLabel);
if (Platform.isWindows()) {
addRow(axis, hidpiDisableBox);
addRow(axis, hidpiDisableBox, hidpiRestartLabel);
}
addRow(axis, languageLabel, languageSelectionBox, languageRestartLabel);
addRow(axis, inputMethodBox, inputMethodExample, inputRestartLabel);
addRow(axis, backgroundColorLabel, presentColor);
addRow(axis, errorCheckerBox, warningsCheckerBox);
addRow(axis, codeCompletionBox);
addRow(axis, importSuggestionsBox);
addRow(axis, displayLabel, displaySelectionBox);
addRow(axis, backgroundColorLabel, presentColor);
addRow(axis, memoryOverrideBox, memoryField, mbLabel);
addRow(axis, deletePreviousBox);
addRow(axis, checkUpdatesBox);
addRow(axis, syncSketchNameBox);
addRow(axis, displayLabel, displaySelectionBox);
if (Platform.isWindows()) {
addRow(axis, autoAssociateBox);
}
+1 -1
View File
@@ -76,7 +76,7 @@ o turn it on when selecting CJKV as a language
_ rearrange item order in PreferencesFrame
_ show 'requires restart' only after making a change
X fixed for interface zoom
_ hidpiDisableBox
X hidpiDisableBox
X inputMethodBox
X languageSelectionBox and languageRestartLabel
_ move to separate panel