From bb460f95bf08a263c5d9d883aa8482db2612dc56 Mon Sep 17 00:00:00 2001 From: "bryner%brianryner.com" Date: Thu, 30 Sep 2004 03:45:14 +0000 Subject: [PATCH] Leave an extra 28px of vertical space when calculating the default window size on GTK, to account for the window titlebar and border. r=shaver, a=ben. git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@162993 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/base/content/browser.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js index 15403ed5aac..daa590536a4 100644 --- a/mozilla/browser/base/content/browser.js +++ b/mozilla/browser/base/content/browser.js @@ -1096,6 +1096,17 @@ function Startup() if ((screen.availWidth / 2) >= 800) defaultWidth = (screen.availWidth / 2) - 20; defaultHeight = screen.availHeight - 10; +#ifdef MOZ_WIDGET_GTK +#define USE_HEIGHT_ADJUST +#endif +#ifdef MOZ_WIDGET_GTK2 +#define USE_HEIGHT_ADJUST +#endif +#ifdef USE_HEIGHT_ADJUST + // On X, we're not currently able to account for the size of the window + // border. Use 28px as a guess (titlebar + bottom window border) + defaultHeight -= 28; +#endif } document.documentElement.setAttribute("width", defaultWidth); document.documentElement.setAttribute("height", defaultHeight);