mirror of
https://github.com/processing/processing4.git
synced 2026-04-25 05:34:32 +02:00
more tidbits for macosx
This commit is contained in:
@@ -661,6 +661,7 @@ public class KjcEngine extends PdeEngine {
|
||||
window = new Window(new Frame());
|
||||
window.addKeyListener(new KeyAdapter() {
|
||||
public void keyPressed(KeyEvent e) {
|
||||
//System.out.println("window got " + e);
|
||||
if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
|
||||
//editor.doClose();
|
||||
//new DelayedClose(editor);
|
||||
@@ -691,6 +692,7 @@ public class KjcEngine extends PdeEngine {
|
||||
|
||||
applet.addKeyListener(new KeyAdapter() {
|
||||
public void keyPressed(KeyEvent e) {
|
||||
//System.out.println("applet got " + e);
|
||||
if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
|
||||
stop();
|
||||
editor.doClose();
|
||||
|
||||
@@ -85,7 +85,12 @@ public class PdeBase implements ActionListener {
|
||||
}
|
||||
|
||||
public PdeBase() {
|
||||
frame = new Frame(WINDOW_TITLE);
|
||||
frame = new Frame(WINDOW_TITLE) {
|
||||
// hack for #@#)$(* macosx
|
||||
public Dimension getMinimumSize() {
|
||||
return new Dimension(300, 300);
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
icon = Toolkit.getDefaultToolkit().getImage("lib/icon.gif");
|
||||
@@ -282,6 +287,8 @@ public class PdeBase implements ActionListener {
|
||||
//((PdeEditor)environment).frame = frame
|
||||
frame.pack(); // maybe this should be before the setBounds call
|
||||
|
||||
//System.out.println(frame.getMinimumSize() + " " + frame.getSize());
|
||||
|
||||
editor.frame = frame; // no longer really used
|
||||
editor.init();
|
||||
rebuildSketchbookMenu(sketchbookMenu);
|
||||
|
||||
@@ -115,6 +115,24 @@ public class PdeEditor extends Panel {
|
||||
PdeBase.getInteger("editor.program.rows", 20),
|
||||
PdeBase.getInteger("editor.program.columns", 60),
|
||||
TextArea.SCROLLBARS_VERTICAL_ONLY);
|
||||
|
||||
/* {
|
||||
public Dimension minimumSize() {
|
||||
System.out.println("old minimum");
|
||||
return new Dimension(100, 100);
|
||||
}
|
||||
|
||||
public Dimension getMinimumSize() {
|
||||
System.out.println("new minimum");
|
||||
return new Dimension(100, 100);
|
||||
}
|
||||
|
||||
public Dimension getMinimumSize(int r, int c) {
|
||||
System.out.println("new minimum 2");
|
||||
return new Dimension(100, 100);
|
||||
}
|
||||
};*/
|
||||
|
||||
textarea.setFont(PdeBase.getFont("editor.program.font",
|
||||
new Font("Monospaced",
|
||||
Font.PLAIN, 12)));
|
||||
@@ -166,6 +184,11 @@ public class PdeEditor extends Panel {
|
||||
} else {
|
||||
presentationWindow = new Window(new Frame());
|
||||
presentationWindow.setBounds(0, 0, screen.width, screen.height);
|
||||
//presentationWindow.addKeyListener(new KeyAdapter() {
|
||||
// public void keyPressed(KeyEvent e) {
|
||||
// System.out.println("pwindow got " + e);
|
||||
// }
|
||||
//});
|
||||
}
|
||||
|
||||
Label label = new Label("stop");
|
||||
|
||||
2
build/macosx/dist/lib/pde_macosx.properties
vendored
2
build/macosx/dist/lib/pde_macosx.properties
vendored
@@ -0,0 +1,2 @@
|
||||
# osx makes things a little large by default
|
||||
editor.program.font = Monospaced,plain,10
|
||||
|
||||
Reference in New Issue
Block a user