"Could not delete disable_hidpi" message on macOS/Linux after closing prefs

This commit is contained in:
Ben Fry
2022-01-17 21:31:46 -05:00
parent 43493f0c0f
commit fcf4b0e180
2 changed files with 7 additions and 2 deletions

View File

@@ -663,7 +663,9 @@ public class PreferencesFrame {
Preferences.set("editor.zoom",
String.valueOf(zoomSelectionBox.getSelectedItem()));
Splash.setDisableHiDPI(hidpiDisableBox.isSelected());
if (Platform.isWindows()) {
Splash.setDisableHiDPI(hidpiDisableBox.isSelected());
}
Preferences.setColor("run.present.bgcolor", presentColor.getBackground());
@@ -726,7 +728,9 @@ public class PreferencesFrame {
} else {
zoomSelectionBox.setSelectedIndex(0);
}
hidpiDisableBox.setSelected(Splash.getDisableHiDPI());
if (Platform.isWindows()) {
hidpiDisableBox.setSelected(Splash.getDisableHiDPI());
}
presentColor.setBackground(Preferences.getColor("run.present.bgcolor"));
presentColorHex.setText(Preferences.get("run.present.bgcolor").substring(1));

View File

@@ -143,6 +143,7 @@ public class Splash extends JFrame {
}
// should only be called from Windows
static public void setDisableHiDPI(boolean disabled) {
try {
File propsFile = Platform.getContentFile("disable_hidpi");