зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1000513 - Combined navigation items in the context menu. r=Unfocused,dao
--HG-- extra : rebase_source : 90f7c49cf5b4917527bc310d74f5f8327191ca22
This commit is contained in:
Родитель
255e8d6ab6
Коммит
062700e6ea
|
@ -219,30 +219,37 @@
|
|||
accesskey="&hidePluginCmd.accesskey;"
|
||||
oncommand="gContextMenu.hidePlugin();"/>
|
||||
<menuseparator id="context-sep-ctp"/>
|
||||
<menuitem id="context-back"
|
||||
label="&backCmd.label;"
|
||||
accesskey="&backCmd.accesskey;"
|
||||
command="Browser:BackOrBackDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<menuitem id="context-forward"
|
||||
label="&forwardCmd.label;"
|
||||
accesskey="&forwardCmd.accesskey;"
|
||||
command="Browser:ForwardOrForwardDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<menuitem id="context-reload"
|
||||
label="&reloadCmd.label;"
|
||||
accesskey="&reloadCmd.accesskey;"
|
||||
oncommand="gContextMenu.reload(event);"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<menuitem id="context-stop"
|
||||
label="&stopCmd.label;"
|
||||
accesskey="&stopCmd.accesskey;"
|
||||
command="Browser:Stop"/>
|
||||
<menuseparator id="context-sep-stop"/>
|
||||
<menuitem id="context-bookmarkpage"
|
||||
label="&bookmarkPageCmd2.label;"
|
||||
accesskey="&bookmarkPageCmd2.accesskey;"
|
||||
oncommand="gContextMenu.bookmarkThisPage();"/>
|
||||
<menugroup id="context-navigation">
|
||||
<menuitem id="context-back"
|
||||
class="menuitem-iconic"
|
||||
tooltiptext="&backButton.tooltip;"
|
||||
aria-label="&backCmd.label;"
|
||||
command="Browser:BackOrBackDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<menuitem id="context-forward"
|
||||
class="menuitem-iconic"
|
||||
tooltiptext="&forwardButton.tooltip;"
|
||||
aria-label="&forwardCmd.label;"
|
||||
command="Browser:ForwardOrForwardDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<menuitem id="context-reload"
|
||||
class="menuitem-iconic"
|
||||
tooltiptext="&reloadButton.tooltip;"
|
||||
aria-label="&reloadCmd.label;"
|
||||
oncommand="gContextMenu.reload(event);"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<menuitem id="context-stop"
|
||||
class="menuitem-iconic"
|
||||
tooltiptext="&stopButton.tooltip;"
|
||||
aria-label="&stopCmd.label;"
|
||||
command="Browser:Stop"/>
|
||||
<menuitem id="context-bookmarkpage"
|
||||
class="menuitem-iconic"
|
||||
tooltiptext="&bookmarkPageCmd2.label;"
|
||||
aria-label="&bookmarkPageCmd2.label;"
|
||||
oncommand="gContextMenu.bookmarkThisPage();"/>
|
||||
</menugroup>
|
||||
<menuseparator id="context-sep-navigation"/>
|
||||
<menuitem id="context-sharepage"
|
||||
label="&sharePageCmd.label;"
|
||||
accesskey="&sharePageCmd.accesskey;"
|
||||
|
|
|
@ -1133,3 +1133,9 @@ toolbarpaletteitem[place="palette"][hidden] {
|
|||
animation-name: uitour-color;
|
||||
animation-duration: 2s;
|
||||
}
|
||||
|
||||
/* Combined context-menu items */
|
||||
#context-navigation > .menuitem-iconic > .menu-iconic-text,
|
||||
#context-navigation > .menuitem-iconic > .menu-accel-container {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -151,8 +151,8 @@ nsContextMenu.prototype = {
|
|||
var shouldShow = !(this.isContentSelected || this.onLink || this.onImage ||
|
||||
this.onCanvas || this.onVideo || this.onAudio ||
|
||||
this.onTextInput || this.onSocial);
|
||||
this.showItem("context-back", shouldShow);
|
||||
this.showItem("context-forward", shouldShow);
|
||||
this.showItem("context-navigation", shouldShow);
|
||||
this.showItem("context-sep-navigation", shouldShow);
|
||||
|
||||
let stopped = XULBrowserWindow.stopCommand.getAttribute("disabled") == "true";
|
||||
|
||||
|
@ -163,7 +163,6 @@ nsContextMenu.prototype = {
|
|||
|
||||
this.showItem("context-reload", stopReloadItem == "reload");
|
||||
this.showItem("context-stop", stopReloadItem == "stop");
|
||||
this.showItem("context-sep-stop", !!stopReloadItem);
|
||||
|
||||
// XXX: Stop is determined in browser.js; the canStop broadcaster is broken
|
||||
//this.setItemAttrFromNode( "context-stop", "disabled", "canStop" );
|
||||
|
|
|
@ -153,18 +153,14 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
|||
<!ENTITY bookmarksToolbarChevron.tooltip "Show more bookmarks">
|
||||
|
||||
<!ENTITY backCmd.label "Back">
|
||||
<!ENTITY backCmd.accesskey "B">
|
||||
<!ENTITY backButton.tooltip "Go back one page">
|
||||
<!ENTITY forwardCmd.label "Forward">
|
||||
<!ENTITY forwardCmd.accesskey "F">
|
||||
<!ENTITY forwardButton.tooltip "Go forward one page">
|
||||
<!ENTITY backForwardButtonMenu.tooltip "Right-click or pull down to show history">
|
||||
<!ENTITY backForwardButtonMenuMac.tooltip "Pull down to show history">
|
||||
<!ENTITY reloadCmd.label "Reload">
|
||||
<!ENTITY reloadCmd.accesskey "R">
|
||||
<!ENTITY reloadButton.tooltip "Reload current page">
|
||||
<!ENTITY stopCmd.label "Stop">
|
||||
<!ENTITY stopCmd.accesskey "S">
|
||||
<!ENTITY stopCmd.macCommandKey ".">
|
||||
<!ENTITY stopButton.tooltip "Stop loading this page">
|
||||
<!ENTITY goEndCap.tooltip "Go to the address in the Location Bar">
|
||||
|
@ -443,7 +439,6 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
|||
<!ENTITY setDesktopBackgroundCmd.label "Set As Desktop Background…">
|
||||
<!ENTITY setDesktopBackgroundCmd.accesskey "S">
|
||||
<!ENTITY bookmarkPageCmd2.label "Bookmark This Page">
|
||||
<!ENTITY bookmarkPageCmd2.accesskey "m">
|
||||
<!ENTITY bookmarkThisLinkCmd.label "Bookmark This Link">
|
||||
<!ENTITY bookmarkThisLinkCmd.accesskey "L">
|
||||
<!ENTITY bookmarkThisFrameCmd.label "Bookmark This Frame">
|
||||
|
|
|
@ -437,24 +437,11 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
list-style-image: url("moz-icon://stock/gtk-preferences?size=menu");
|
||||
}
|
||||
|
||||
#context-stop {
|
||||
list-style-image: url("moz-icon://stock/gtk-stop?size=menu");
|
||||
}
|
||||
|
||||
#context-stop[disabled] {
|
||||
list-style-image: url("moz-icon://stock/gtk-stop?size=menu&state=disabled");
|
||||
}
|
||||
|
||||
#placesContext_reload,
|
||||
#context-reload,
|
||||
#context-reloadframe {
|
||||
list-style-image: url("moz-icon://stock/gtk-refresh?size=menu");
|
||||
}
|
||||
|
||||
#context-reload[disabled] {
|
||||
list-style-image: url("moz-icon://stock/gtk-refresh?size=menu&state=disabled");
|
||||
}
|
||||
|
||||
#menu_zoomEnlarge {
|
||||
list-style-image: url("moz-icon://stock/gtk-zoom-in?size=menu");
|
||||
}
|
||||
|
@ -467,38 +454,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
list-style-image: url("moz-icon://stock/gtk-zoom-100?size=menu");
|
||||
}
|
||||
|
||||
#context-back {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu");
|
||||
}
|
||||
|
||||
#context-back[disabled] {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu&state=disabled");
|
||||
}
|
||||
|
||||
#context-back:-moz-locale-dir(rtl) {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu");
|
||||
}
|
||||
|
||||
#context-back[disabled]:-moz-locale-dir(rtl) {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu&state=disabled");
|
||||
}
|
||||
|
||||
#context-forward {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu");
|
||||
}
|
||||
|
||||
#context-forward[disabled] {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu&state=disabled");
|
||||
}
|
||||
|
||||
#context-forward:-moz-locale-dir(rtl) {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu");
|
||||
}
|
||||
|
||||
#context-forward[disabled]:-moz-locale-dir(rtl) {
|
||||
list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu&state=disabled");
|
||||
}
|
||||
|
||||
#menu_showAllHistory {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
|
||||
-moz-image-region: rect(0px 32px 16px 16px);
|
||||
|
@ -2289,3 +2244,23 @@ chatbox {
|
|||
#UITourTooltipButtons {
|
||||
margin-bottom: -10px;
|
||||
}
|
||||
|
||||
%include ../shared/contextmenu.inc.css
|
||||
|
||||
#context-navigation {
|
||||
background-color: -moz-dialog;
|
||||
padding-bottom: 2px;
|
||||
margin-bottom: 2px;
|
||||
-moz-appearance: menuitem;
|
||||
}
|
||||
|
||||
#context-navigation > .menuitem-iconic > .menu-iconic-left {
|
||||
visibility: visible;
|
||||
/* override toolkit/themes/linux/global/menu.css */
|
||||
-moz-padding-end: 0 !important;
|
||||
-moz-margin-end: 0 !important;
|
||||
}
|
||||
|
||||
#context-sep-navigation {
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
|
|
@ -4430,3 +4430,10 @@ window > chatbox {
|
|||
width: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
%include ../shared/contextmenu.inc.css
|
||||
|
||||
#context-navigation > .menuitem-iconic {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
|
||||
menugroup > .menuitem-iconic[disabled="true"] > .menu-iconic-left {
|
||||
opacity: .3;
|
||||
}
|
||||
|
||||
#context-navigation > .menuitem-iconic {
|
||||
-moz-box-flex: 1;
|
||||
-moz-box-pack: center;
|
||||
-moz-box-align: center;
|
||||
}
|
||||
|
||||
#context-navigation > .menuitem-iconic > .menu-iconic-left {
|
||||
-moz-appearance: none;
|
||||
}
|
||||
|
||||
#context-navigation > #context-back > .menu-iconic-left {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||
-moz-image-region: rect(0, 36px, 18px, 18px);
|
||||
}
|
||||
|
||||
#context-navigation > #context-forward > .menu-iconic-left {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||
-moz-image-region: rect(0, 72px, 18px, 54px);
|
||||
}
|
||||
|
||||
#context-navigation > #context-reload > .menu-iconic-left {
|
||||
list-style-image: url("chrome://browser/skin/reload-stop-go.png");
|
||||
-moz-image-region: rect(0, 14px, 14px, 0);
|
||||
}
|
||||
|
||||
#context-navigation > #context-stop > .menu-iconic-left {
|
||||
list-style-image: url("chrome://browser/skin/reload-stop-go.png");
|
||||
-moz-image-region: rect(0, 28px, 14px, 14px);
|
||||
}
|
||||
|
||||
#context-navigation > #context-bookmarkpage > .menu-iconic-left {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||
-moz-image-region: rect(0, 144px, 18px, 126px);
|
||||
}
|
||||
|
||||
#context-back:-moz-locale-dir(rtl),
|
||||
#context-forward:-moz-locale-dir(rtl),
|
||||
#context-reload:-moz-locale-dir(rtl) {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
#context-navigation > .menuitem-iconic > .menu-iconic-left > .menu-iconic-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin: 7px;
|
||||
}
|
|
@ -2935,3 +2935,16 @@ chatbox {
|
|||
#UITourTooltipButtons {
|
||||
margin: 24px -4px -4px;
|
||||
}
|
||||
|
||||
%include ../shared/contextmenu.inc.css
|
||||
|
||||
#context-navigation {
|
||||
background-color: -moz-dialog;
|
||||
padding-bottom: 2px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
#context-sep-navigation {
|
||||
-moz-margin-start: -28px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче