mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
X macosx.. editor.status.font needs to be size 12
X same under windows, just wasn't being set properly before X header font needed to be set each time as well X introduce pde.properties_OSNAME X tested to make sure it joins with the other pde.properties ok X setPixel(i, j, #99CC00); X not working anymore Syntax error: unexpected token: CC00 X problem was substitute only worked along with =
This commit is contained in:
@@ -215,7 +215,8 @@ public class KjcEngine extends at.dms.kjc.Main implements PdeEngine {
|
||||
|
||||
if (PdeBase.getBoolean("compiler.inline_web_colors", true)) {
|
||||
// convert "= #cc9988" into "= 0xffcc9988"
|
||||
program = substipoot(program, "(=\\s*)\\#([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])", "$1 0xff$2$3$4");
|
||||
//program = substipoot(program, "(=\\s*)\\#([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])", "$1 0xff$2$3$4");
|
||||
program = substipoot(program, "#([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])", "0xff$1$2$3");
|
||||
}
|
||||
|
||||
if ((program.indexOf("void setup()") != -1) ||
|
||||
|
||||
@@ -43,7 +43,15 @@ public class PdeBase implements ActionListener {
|
||||
|
||||
} else {
|
||||
//System.out.println("unknown OS");
|
||||
System.out.println(System.getProperty("os.name");
|
||||
//System.out.println(System.getProperty("os.name"));
|
||||
String osname = System.getProperty("os.name");
|
||||
//System.out.println("osname is " + osname);
|
||||
if (osname.indexOf("Windows") != -1) {
|
||||
platform = WINDOWS;
|
||||
} else {
|
||||
System.out.println("unhandled osname: " + osname);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +75,9 @@ public class PdeBase implements ActionListener {
|
||||
try {
|
||||
//properties.load(new FileInputStream("lib/pde.properties"));
|
||||
properties.load(getClass().getResource("pde.properties").openStream());
|
||||
String platformProps = "pde.properties_" + platforms[platform];
|
||||
properties.load(getClass().getResource(platformProps).openStream());
|
||||
//properties.list(System.out);
|
||||
|
||||
} catch (Exception e) {
|
||||
System.err.println("Error reading pde.properties");
|
||||
|
||||
@@ -122,7 +122,6 @@ public class PdeEditorHeader extends Panel /* implements ActionListener*/ {
|
||||
|
||||
Graphics g = offscreen.getGraphics();
|
||||
if (font == null) {
|
||||
//font = new Font("SansSerif", Font.PLAIN, 12);
|
||||
font = PdeBase.getFont("editor.header.font",
|
||||
new Font("SansSerif", Font.PLAIN, 12));
|
||||
g.setFont(font);
|
||||
@@ -158,6 +157,7 @@ public class PdeEditorHeader extends Panel /* implements ActionListener*/ {
|
||||
|
||||
boolean boringUser = editor.userName.equals("default");
|
||||
|
||||
g.setFont(font); // needs to be set each time
|
||||
g.setColor(secondaryColor);
|
||||
g.drawString(SKETCH_TITLER, sketchTitleLeft, baseline);
|
||||
if (sketchModified) g.drawString("\u00A7", modifiedLeft, baseline);
|
||||
|
||||
@@ -23,11 +23,11 @@ public class PdeEditorListener extends KeyAdapter implements FocusListener {
|
||||
public PdeEditorListener(PdeEditor editor) {
|
||||
this.editor = editor;
|
||||
|
||||
expandTabs = PdeBase.getBoolean("editor.expandTabs", false);
|
||||
expandTabs = PdeBase.getBoolean("editor.expandTabs", true);
|
||||
tabSize = PdeBase.getInteger("editor.tabSize", 2);
|
||||
tabString = spaces.substring(0, tabSize);
|
||||
autoIndent = PdeBase.getBoolean("editor.autoIndent", false);
|
||||
balanceParens = PdeBase.getBoolean("editor.balanceParens", false);
|
||||
autoIndent = PdeBase.getBoolean("editor.autoIndent", true);
|
||||
balanceParens = PdeBase.getBoolean("editor.balanceParens", true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ public class PdeEditorStatus extends Panel
|
||||
Graphics g = offscreen.getGraphics();
|
||||
if (font == null) {
|
||||
font = PdeBase.getFont("editor.status.font",
|
||||
new Font("SansSerif", Font.PLAIN, 10));
|
||||
new Font("SansSerif", Font.PLAIN, 12));
|
||||
g.setFont(font);
|
||||
metrics = g.getFontMetrics();
|
||||
ascent = metrics.getAscent();
|
||||
|
||||
Reference in New Issue
Block a user