From 91256a6742cfe7181b5b890c6e14ef55c360854f Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 2 May 2022 08:14:42 -0400 Subject: [PATCH] show/hide "requires restart" for hidpiDisableBox in prefs --- app/src/processing/app/ui/PreferencesFrame.java | 14 ++++++++------ todo.txt | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/processing/app/ui/PreferencesFrame.java b/app/src/processing/app/ui/PreferencesFrame.java index 2831f0db2..37f2ebdc6 100644 --- a/app/src/processing/app/ui/PreferencesFrame.java +++ b/app/src/processing/app/ui/PreferencesFrame.java @@ -75,6 +75,7 @@ public class PreferencesFrame { JLabel zoomRestartLabel; JCheckBox hidpiDisableBox; + JLabel hidpiRestartLabel; JCheckBox syncSketchNameBox; JComboBox 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); } diff --git a/todo.txt b/todo.txt index eb5a75679..a07db254c 100755 --- a/todo.txt +++ b/todo.txt @@ -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