mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 505033: Only show close button when in fullscreen mode, r=gavin
This commit is contained in:
parent
4f85a16589
commit
830ac57864
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user