Bug 262566: Print preview should hide the browser statusbar

r=timeless, sr=neil
This commit is contained in:
Stefan.Borggraefe%gmx.de 2004-10-17 22:03:28 +00:00
Родитель 35a6a12bca
Коммит eb17d782d0
1 изменённых файлов: 15 добавлений и 3 удалений

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

@ -85,9 +85,12 @@ function toggleAffectedChrome(aHide)
// (*) personal toolbar
// (*) tab browser ``strip''
// (*) sidebar
// (*) statusbar
if (!gChromeState)
gChromeState = new Object;
var statusbar = document.getElementById("status-bar");
var navToolbox = document.getElementById("navigator-toolbox");
navToolbox.hidden = aHide;
var theTabbrowser = document.getElementById("content");
@ -111,20 +114,29 @@ function toggleAffectedChrome(aHide)
}
document.getElementById("sidebar-box").hidden = true;
document.getElementById("sidebar-splitter").hidden = true;
//deal with tab browser
// deal with tab browser
gChromeState.hadTabStrip = theTabbrowser.getStripVisibility();
theTabbrowser.setStripVisibilityTo(false);
// deal with the Status Bar
gChromeState.statusbarWasHidden = statusbar.hidden;
statusbar.hidden = true;
}
else
{
// restoring normal mode (i.e., leaving print preview mode)
//restore tab browser
theTabbrowser.setStripVisibilityTo(gChromeState.hadTabStrip);
if (gChromeState.sidebar == "was-collapsed" ||
gChromeState.sidebar == "was-visible")
document.getElementById("sidebar-splitter").hidden = false;
if (gChromeState.sidebar == "was-visible")
document.getElementById("sidebar-box").hidden = false;
// restore tab browser
theTabbrowser.setStripVisibilityTo(gChromeState.hadTabStrip);
// restore the Status Bar
statusbar.hidden = gChromeState.statusbarWasHidden;
}
// if we are unhiding and sidebar used to be there rebuild it