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.

This commit is contained in:
bryner%brianryner.com 2004-09-30 03:44:34 +00:00
Родитель 234716880e
Коммит 87c9866b12
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -323,6 +323,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);