messing with dynamic update of prefs

This commit is contained in:
Ben Fry
2021-07-02 21:20:58 -04:00
parent ff61027148
commit 855e7d8354
4 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -663,7 +663,7 @@ public abstract class Editor extends JFrame implements RunnerListener {
* the app is just starting up, or the user just finished messing
* with things in the Preferences window.
*/
protected void applyPreferences() {
public void applyPreferences() {
// Update fonts and other items controllable from the prefs
textarea.getPainter().updateAppearance();
textarea.repaint();
@@ -1,6 +1,8 @@
package processing.app.tools;
import processing.app.Base;
import processing.app.Preferences;
import processing.app.ui.Editor;
public class ThemeEngine implements Tool {
@@ -19,5 +21,10 @@ public class ThemeEngine implements Tool {
public void run() {
//setVisible(true);
//Preferences.init();
for (Editor editor : base.getEditors()) {
System.out.println("Updating settings for " + editor.getSketch().getName());
editor.applyPreferences();
}
}
}
@@ -2316,7 +2316,7 @@ public class JavaEditor extends Editor {
@Override
protected void applyPreferences() {
public void applyPreferences() {
super.applyPreferences();
if (jmode != null) {
+1
View File
@@ -4,6 +4,7 @@ X should prevent conflicts, avoid papering over other bugs
X remove the PDE classpath from sketches
X causing it to include incomplete JFX, other misc; too confusing
X add ui.font.family and ui.font.size as preferences
X Editor.applyPreferences() was protected, now public
readme
_ was fixed in the source for 4.0a5, but may not have been included in the dist