зеркало из https://github.com/mozilla/pjs.git
68136 - Mozilla should have a Full-screen mode, r=ben, sr=jst/jag
This commit is contained in:
Родитель
6915a0f585
Коммит
3cc1fb86f4
|
@ -414,8 +414,14 @@ function Startup()
|
|||
remoteService.addBrowserInstance(window);
|
||||
}
|
||||
}
|
||||
|
||||
// called when we go into full screen, even if it is
|
||||
// initiated by a web page script
|
||||
addEventListener("fullscreen", onFullScreen, false);
|
||||
|
||||
// now load bookmarks after a delay
|
||||
setTimeout(LoadBookmarksCallback, 0);
|
||||
|
||||
}
|
||||
|
||||
function LoadBookmarksCallback()
|
||||
|
@ -1543,3 +1549,14 @@ function FillInPTTooltip(tipElement)
|
|||
|
||||
return true; // show tooltip
|
||||
}
|
||||
|
||||
function BrowserFullScreen()
|
||||
{
|
||||
window.fullScreen = !window.fullScreen;
|
||||
}
|
||||
|
||||
function onFullScreen()
|
||||
{
|
||||
FullScreen.toggle();
|
||||
}
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ Contributor(s): ______________________________________. -->
|
|||
<script type="application/x-javascript" src="chrome://global/content/nsClipboard.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/fullscreen.js"/>
|
||||
|
||||
<!-- Content Area -->
|
||||
<script type="application/x-javascript" src="chrome://navigator/content/nsBrowserStatusHandler.js"/>
|
||||
|
@ -124,7 +125,7 @@ Contributor(s): ______________________________________. -->
|
|||
|
||||
<toolbar class="toolbar-primary chromeclass-toolbar" id="nav-bar" persist="collapsed"
|
||||
grippytooltiptext="&navigationToolbar.tooltip;"
|
||||
tbalign="stretch">
|
||||
tbalign="stretch" fullscreentoolbar="true">
|
||||
<hbox id="nav-bar-buttons">
|
||||
<toolbarbutton id="back-button" type="menu-button" class="toolbarbutton-1"
|
||||
label="&backButton.label;"
|
||||
|
@ -217,6 +218,17 @@ Contributor(s): ______________________________________. -->
|
|||
<button id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')"
|
||||
tooltiptext="&throbber.tooltip;"/>
|
||||
</hbox>
|
||||
|
||||
<hbox id="window-controls" hidden="true" fullscreencontrol="true">
|
||||
<toolbarbutton id="minimize-button" class="toolbarbutton-1"
|
||||
oncommand="window.minimize();"/>
|
||||
|
||||
<toolbarbutton id="restore-button" class="toolbarbutton-1"
|
||||
oncommand="BrowserFullScreen();"/>
|
||||
|
||||
<toolbarbutton id="close-button" class="toolbarbutton-1"
|
||||
oncommand="window.close();"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<toolbar id="PersonalToolbar" class="chromeclass-directories" persist="collapsed" dragdroparea="innermostBox"
|
||||
|
|
|
@ -135,6 +135,7 @@
|
|||
<!-- View Menu -->
|
||||
<command id="View:PageSource" oncommand="BrowserViewSource();"/>
|
||||
<command id="View:PageInfo" oncommand="BrowserPageInfo(getBrowser().contentDocument);"/>
|
||||
<command id="View:FullScreen" oncommand="BrowserFullScreen();"/>
|
||||
|
||||
<!-- Search Menu -->
|
||||
<command id="Browser:Find" oncommand="BrowserFind();" observes="isImage"/>
|
||||
|
@ -226,6 +227,9 @@
|
|||
<menuitem label="&componentbarCmd.label;" accesskey="&componentbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewcomponentbar"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuitem id="menuitem_fullScreen" accesskey="&fullScreenCmd.accesskey;"
|
||||
label="&fullScreenCmd.label;" key="key_fullScreen"
|
||||
command="View:FullScreen" hidden="true"/>
|
||||
<menuseparator />
|
||||
|
||||
<!-- overlayed from viewZoomOverlay.xul -->
|
||||
|
|
|
@ -20,8 +20,10 @@
|
|||
|
||||
<key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="alt"/>
|
||||
|
||||
<key id="key_fullScreen" keycode="VK_F11" command="View:FullScreen"/>
|
||||
</keyset>
|
||||
|
||||
<menuitem id="menuitem_fullScreen" hidden="false"/>
|
||||
</overlay>
|
||||
|
||||
|
||||
|
|
|
@ -63,6 +63,8 @@
|
|||
<!ENTITY pageInfoCmd.label "Page Info">
|
||||
<!ENTITY pageInfoCmd.accesskey "i">
|
||||
<!ENTITY pageInfoCmd.commandkey "i">
|
||||
<!ENTITY fullScreenCmd.label "Full Screen">
|
||||
<!ENTITY fullScreenCmd.accesskey "f">
|
||||
<!ENTITY translateMenu.label "Translate">
|
||||
<!ENTITY translateMenu.accesskey "T">
|
||||
<!ENTITY translate.commandKey "t">
|
||||
|
|
Загрузка…
Ссылка в новой задаче