summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2012-04-24 12:24:50 +0000
committerArtur Signell <artur.signell@itmill.com>2012-04-24 12:24:50 +0000
commit1b2117fcf2fe62c67f29a913c60d93c358f3198c (patch)
tree34ff24f7b9c3add7bf6f51c731a1ceb42c1ecad9 /src/com/vaadin/terminal
parentfc36ea595e473c00ccb135ece3439d0441561117 (diff)
downloadvaadin-framework-1b2117fcf2fe62c67f29a913c60d93c358f3198c.tar.gz
vaadin-framework-1b2117fcf2fe62c67f29a913c60d93c358f3198c.zip
Increased debug window default size (#8523)
svn changeset:23621/svn branch:6.8
Diffstat (limited to 'src/com/vaadin/terminal')
-rw-r--r--src/com/vaadin/terminal/gwt/client/VDebugConsole.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/VDebugConsole.java b/src/com/vaadin/terminal/gwt/client/VDebugConsole.java
index c43581b000..19b478b098 100644
--- a/src/com/vaadin/terminal/gwt/client/VDebugConsole.java
+++ b/src/com/vaadin/terminal/gwt/client/VDebugConsole.java
@@ -170,6 +170,9 @@ public class VDebugConsole extends VOverlay implements Console {
private static final String help = "Drag title=move, shift-drag=resize, doubleclick title=min/max."
+ "Use debug=quiet to log only to browser console.";
+ private static final int DEFAULT_WIDTH = 650;
+ private static final int DEFAULT_HEIGHT = 400;
+
public VDebugConsole() {
super(false, false);
getElement().getStyle().setOverflow(Overflow.HIDDEN);
@@ -291,10 +294,20 @@ public class VDebugConsole extends VOverlay implements Console {
height = Integer.parseInt(split[3]);
autoScrollValue = Boolean.valueOf(split[4]);
} else {
- width = 400;
- height = 150;
- top = Window.getClientHeight() - 160;
- left = Window.getClientWidth() - 410;
+ int windowHeight = Window.getClientHeight();
+ int windowWidth = Window.getClientWidth();
+ width = DEFAULT_WIDTH;
+ height = DEFAULT_HEIGHT;
+
+ if (height > windowHeight / 2) {
+ height = windowHeight / 2;
+ }
+ if (width > windowWidth / 2) {
+ width = windowWidth / 2;
+ }
+
+ top = windowHeight - (height + 10);
+ left = windowWidth - (width + 10);
}
setPixelSize(width, height);
setPopupPosition(left, top);