fix the twice-doubled status bar

This commit is contained in:
Ben Fry
2017-02-10 16:16:58 -05:00
parent b6e0c7d0d8
commit ff80988f1a
3 changed files with 10 additions and 6 deletions
+6 -4
View File
@@ -43,6 +43,7 @@ import processing.core.*;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Frame;
@@ -347,10 +348,11 @@ public abstract class Editor extends JFrame implements RunnerListener {
state.apply(this);
// Set the minimum size for the editor window
int minWidth = Preferences.getInteger("editor.window.width.min");
int minHeight = Preferences.getInteger("editor.window.height.min");
//setMinimumSize(new Dimension(minWidth, minHeight));
setMinimumSize(Toolkit.zoom(minWidth, minHeight));
int minWidth =
Toolkit.zoom(Preferences.getInteger("editor.window.width.min"));
int minHeight =
Toolkit.zoom(Preferences.getInteger("editor.window.height.min"));
setMinimumSize(new Dimension(minWidth, minHeight));
// Bring back the general options for the editor
applyPreferences();
+2 -2
View File
@@ -328,11 +328,11 @@ public class EditorStatus extends BasicSplitPaneDivider { //JPanel {
public Dimension getMinimumSize() {
return Toolkit.zoom(300, HIGH);
return new Dimension(Toolkit.zoom(300), HIGH);
}
public Dimension getMaximumSize() {
return Toolkit.zoom(super.getMaximumSize().width, HIGH);
return new Dimension(super.getMaximumSize().width, HIGH);
}
}
+2
View File
@@ -844,9 +844,11 @@ public class Toolkit {
}
/*
static Dimension zoom(int w, int h) {
return new Dimension(zoom(w), zoom(h));
}
*/
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .