mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
yet another attempt for the editor sizing
This commit is contained in:
@@ -263,8 +263,13 @@ public abstract class Editor extends JFrame implements RunnerListener {
|
||||
textarea.setRightClickPopup(new TextAreaPopup());
|
||||
textarea.setHorizontalOffset(JEditTextArea.leftHandGutter);
|
||||
//System.out.println(textarea.getPreferredSize());
|
||||
final int editorHeight =
|
||||
Preferences.getInteger("editor.window.height.default") - 240;
|
||||
final int editorWidth =
|
||||
Preferences.getInteger("editor.window.width.default") - 70;
|
||||
// textarea.setPreferredSize(new Dimension(textarea.getPreferredSize().width,
|
||||
// Toolkit.zoom(360)));
|
||||
// Toolkit.zoom(textareaHeight)));
|
||||
textarea.setPreferredSize(Toolkit.zoom(editorWidth, editorHeight));
|
||||
|
||||
{ // Hack: add Numpad Slash as an alternative shortcut for Comment/Uncomment
|
||||
int modifiers = Toolkit.awtToolkit.getMenuShortcutKeyMask();
|
||||
|
||||
@@ -844,6 +844,11 @@ public class Toolkit {
|
||||
}
|
||||
|
||||
|
||||
static public Dimension zoom(int w, int h) {
|
||||
return new Dimension(zoom(w), zoom(h));
|
||||
}
|
||||
|
||||
|
||||
static private float parseZoom() {
|
||||
String zoomSel = Preferences.get("editor.zoom");
|
||||
if (zoomOptions.hasValue(zoomSel)) {
|
||||
@@ -870,13 +875,6 @@ public class Toolkit {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
static Dimension zoom(int w, int h) {
|
||||
return new Dimension(zoom(w), zoom(h));
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user