Bug 505033: Only show close button when in fullscreen mode, r=gavin

This commit is contained in:
Mark Finkle 2009-07-20 16:22:22 -04:00
parent 4f85a16589
commit 830ac57864
5 changed files with 28 additions and 2 deletions

View File

@ -232,7 +232,7 @@ var BrowserUI = {
// If we have a dialog push it on the stack and set the attr for CSS
if (aDialog) {
this._dialogs.push(aDialog);
document.getElementById("toolbar-main").setAttribute("dialog", "true")
document.getElementById("toolbar-main").setAttribute("dialog", "true");
}
},
@ -243,7 +243,7 @@ var BrowserUI = {
// If no more dialogs are being displayed, remove the attr for CSS
if (!this._dialogs.length)
document.getElementById("toolbar-main").removeAttribute("dialog")
document.getElementById("toolbar-main").removeAttribute("dialog");
},
switchPane : function(id) {

View File

@ -138,6 +138,14 @@ var Browser = {
ws.updateSize(w, h);
}
window.addEventListener("resize", resizeHandler, false);
function fullscreenHandler() {
if (!window.fullScreen)
document.getElementById("toolbar-main").setAttribute("fullscreen", "true");
else
document.getElementById("toolbar-main").removeAttribute("fullscreen");
}
window.addEventListener("fullscreen", fullscreenHandler, false);
function viewportHandler(bounds, boundsSizeChanged) {
self._canvasBrowser.viewportHandler(bounds, boundsSizeChanged);

View File

@ -63,13 +63,19 @@ toolbarbutton.urlbar-button {
}
#tool-app-close {
visibility: hidden;
min-height: 0 !important;
min-width: 0 !important;
margin-top: -40px; /* keep pixels */
list-style-image: url("chrome://browser/skin/images/fullscreen-close-40.png");
}
#toolbar-main[fullscreen="true"] #tool-app-close {
visibility: visible;
}
#toolbar-main[dialog="true"] #tool-app-close {
visibility: visible;
list-style-image: url("chrome://browser/skin/images/fullscreen-up-40.png");
}

View File

@ -48,13 +48,19 @@
}
#tool-app-close {
visibility: hidden;
min-height: 0 !important;
min-width: 0 !important;
margin-top: -40px; /* keep pixels */
list-style-image: url("chrome://browser/skin/images/fullscreen-close-40.png");
}
#toolbar-main[fullscreen="true"] #tool-app-close {
visibility: visible;
}
#toolbar-main[dialog="true"] #tool-app-close {
visibility: visible;
list-style-image: url("chrome://browser/skin/images/fullscreen-up-40.png");
}

View File

@ -48,13 +48,19 @@
}
#tool-app-close {
visibility: hidden;
min-height: 0 !important;
min-width: 0 !important;
margin-top: -17px; /* keep pixels */
list-style-image: url("chrome://browser/skin/images/fullscreen-close-24.png");
}
#toolbar-main[fullscreen="true"] #tool-app-close {
visibility: visible;
}
#toolbar-main[dialog="true"] #tool-app-close {
visibility: visible;
list-style-image: url("chrome://browser/skin/images/fullscreen-up-24.png");
}