Bug 585370 - "Implement the Firefox button on Linux" [r=dao ui-r=faaborg a=dolske]

This commit is contained in:
Bill Gianopoulos 2010-11-12 02:01:00 -08:00
Родитель 1fe7cbab52
Коммит 72b1b6112e
7 изменённых файлов: 84 добавлений и 4 удалений

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

@ -83,6 +83,9 @@ endif
ifneq (,$(filter windows, $(MOZ_WIDGET_TOOLKIT)))
DEFINES += -DCAN_DRAW_IN_TITLEBAR=1
endif
ifneq (,$(filter windows gtk2, $(MOZ_WIDGET_TOOLKIT)))
DEFINES += -DMENUBAR_CAN_AUTOHIDE=1
endif

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

@ -145,9 +145,17 @@ toolbar[mode="icons"] > #reload-button[displaystop] {
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#menuitem-iconic-tooltip");
}
%ifdef MENUBAR_CAN_AUTOHIDE
%ifndef CAN_DRAW_IN_TITLEBAR
#appmenu-toolbar-button > .toolbarbutton-text {
display: -moz-box;
}
%endif
#appmenu_offlineModeRecovery:not([checked=true]) {
display: none;
}
%endif
/* ::::: location bar ::::: */
#urlbar {

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

@ -4750,6 +4750,9 @@ function updateAppButtonDisplay() {
document.documentElement.setAttribute("chromemargin", "0,-1,-1,-1");
else
document.documentElement.removeAttribute("chromemargin");
#else
document.getElementById("appmenu-toolbar-button").hidden =
!displayAppButton;
#endif
}
#endif

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

@ -764,6 +764,13 @@
</toolbaritem>
</toolbar>
#ifdef MENUBAR_CAN_AUTOHIDE
#ifndef CAN_DRAW_IN_TITLEBAR
#define APPMENU_ON_TABBAR
#endif
#endif
<toolbar id="TabsToolbar"
fullscreentoolbar="true"
customizable="true"
@ -771,9 +778,23 @@
iconsize="small" defaulticonsize="small" lockiconsize="true"
aria-label="&tabsToolbar.label;"
context="toolbar-context-menu"
#ifdef APPMENU_ON_TABBAR
defaultset="appmenu-toolbar-button,tabbrowser-tabs,new-tab-button,alltabs-button,tabview-button,tabs-closebutton"
#else
defaultset="tabbrowser-tabs,new-tab-button,alltabs-button,tabview-button,tabs-closebutton"
#endif
collapsed="true">
#ifdef APPMENU_ON_TABBAR
<toolbarbutton id="appmenu-toolbar-button"
class="chromeclass-toolbar-additional"
type="menu"
label="&brandShortName;"
tooltiptext="&appMenuButton.tooltip;">
#include browser-appmenu.inc
</toolbarbutton>
#endif
<tabs id="tabbrowser-tabs"
class="tabbrowser-tabs"
tabbrowser="content"

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

@ -237,6 +237,7 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic");
}
#appmenu_newNavigator,
#placesContext_open\:newwindow,
#menu_newNavigator,
#context-openlink,
@ -245,6 +246,8 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
-moz-image-region: rect(0px 80px 16px 64px);
}
#appmenu_newTab,
#appmenu_newTab_popup,
#placesContext_open\:newtab,
#placesContext_openContainer\:tabs,
#menu_newNavigatorTab,
@ -254,6 +257,7 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
-moz-image-region: rect(0px 64px 16px 48px);
}
#appmenu_openFile,
#menu_openFile {
list-style-image: url("moz-icon://stock/gtk-open?size=menu");
}
@ -270,6 +274,7 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-media-pause?size=menu");
}
#appmenu_savePage,
#menu_savePage,
#context-savelink,
#context-saveimage,
@ -280,15 +285,19 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-save-as?size=menu");
}
#appmenu_printPreview,
#menu_printPreview {
list-style-image: url("moz-icon://stock/gtk-print-preview?size=menu");
}
#appmenu_print,
#appmenu_print_popup,
#menu_print,
#context-printframe {
list-style-image: url("moz-icon://stock/gtk-print?size=menu");
}
#appmenu-quit,
#menu_FileQuitItem {
list-style-image: url("moz-icon://stock/gtk-quit?size=menu");
}
@ -371,6 +380,7 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-select-all?size=menu");
}
#appmenu_find,
#menu_find {
list-style-image: url("moz-icon://stock/gtk-find?size=menu");
}
@ -379,6 +389,8 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-find?size=menu&state=disabled");
}
#appmenu_customize,
#appmenu_preferences,
#menu_preferences {
list-style-image: url("moz-icon://stock/gtk-preferences?size=menu");
}
@ -462,11 +474,15 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-home?size=menu");
}
#appmenu_history,
#appmenu_showAllHistory,
#menu_showAllHistory {
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
-moz-image-region: rect(0px 32px 16px 16px);
}
#appmenu_bookmarks,
#appmenu_showAllBookmarks,
#bookmarksShowAll {
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
-moz-image-region: rect(0px 48px 16px 32px);
@ -492,6 +508,7 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png");
}
#appmenu_downloads,
#menu_openDownloads {
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
-moz-image-region: rect(0px 16px 16px 0px);
@ -507,14 +524,18 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-properties?size=menu");
}
#appmenu_sanitizeHistory,
#sanitizeItem {
list-style-image: url("moz-icon://stock/gtk-clear?size=menu");
}
#appmenu_help,
#appmenu_openHelp,
#menu_openHelp {
list-style-image: url("moz-icon://stock/gtk-help?size=menu");
}
#appmenu_about,
#aboutName {
list-style-image: url("moz-icon://stock/gtk-about?size=menu");
}
@ -1693,6 +1714,32 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
-moz-transform: translate(0, 2px);
}
/* Application menu toolbar button */
#appmenu-toolbar-button > .toolbarbutton-text {
margin-top: -2px !important;
margin-bottom: -2px !important;
}
#appmenuSecondaryPane {
-moz-border-start: 1px solid ThreeDShadow;
}
#appmenuSecondaryPane-spacer {
min-height: 1em;
}
#appmenu-cut {
list-style-image: url("moz-icon://stock/gtk-cut?size=menu");
}
#appmenu-copy {
list-style-image: url("moz-icon://stock/gtk-copy?size=menu");
}
#appmenu-paste {
list-style-image: url("moz-icon://stock/gtk-paste?size=menu");
}
#wrapper-appmenu-toolbar-button,
.appmenu-edit-button[disabled="true"] {
opacity: .3;
}
/* Inspector / Highlighter */
#highlighter-panel {

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

@ -274,9 +274,7 @@ toolbar[type="menubar"] {
min-height: 0 !important;
border: 0 !important;
}
%endif
%ifdef XP_WIN
%else
toolbar[type="menubar"][autohide="true"] {
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-menubar-autohide");
overflow: hidden;

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

@ -67,7 +67,7 @@ progressmeter[mode="undetermined"] {
-moz-binding: url("chrome://global/content/bindings/progressmeter.xml#progressmeter-undetermined");
}
toolbar[type="menubar"]:not(:-moz-lwtheme):-moz-system-metric(menubar-drag) {
toolbar[type="menubar"]:not([autohide="true"]):not(:-moz-lwtheme):-moz-system-metric(menubar-drag) {
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag");
}