зеркало из https://github.com/mozilla/pjs.git
Bug 407931 Switch from buttonstyle to mode r=stefanh,IanN sr=jag
This commit is contained in:
Родитель
2ea893dbc9
Коммит
65c4789907
|
@ -142,8 +142,8 @@
|
||||||
<toolbar class="toolbar-primary chromeclass-toolbar" id="nav-bar" persist="collapsed"
|
<toolbar class="toolbar-primary chromeclass-toolbar" id="nav-bar" persist="collapsed"
|
||||||
grippytooltiptext="&navigationToolbar.tooltip;"
|
grippytooltiptext="&navigationToolbar.tooltip;"
|
||||||
fullscreentoolbar="true">
|
fullscreentoolbar="true">
|
||||||
<hbox id="nav-bar-buttons">
|
<toolbarbutton id="back-button" type="menu-button"
|
||||||
<toolbarbutton id="back-button" type="menu-button" class="toolbarbutton-1"
|
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||||
label="&backButton.label;"
|
label="&backButton.label;"
|
||||||
oncommand="if (event.target==this) BrowserBack(); else gotoHistoryIndex(event);"
|
oncommand="if (event.target==this) BrowserBack(); else gotoHistoryIndex(event);"
|
||||||
observes="canGoBack" context="backMenu"
|
observes="canGoBack" context="backMenu"
|
||||||
|
@ -151,7 +151,8 @@
|
||||||
<menupopup context="" onpopupshowing="BrowserBackMenu(event);"/>
|
<menupopup context="" onpopupshowing="BrowserBackMenu(event);"/>
|
||||||
</toolbarbutton>
|
</toolbarbutton>
|
||||||
|
|
||||||
<toolbarbutton id="forward-button" type="menu-button" class="toolbarbutton-1"
|
<toolbarbutton id="forward-button" type="menu-button"
|
||||||
|
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||||
label="&forwardButton.label;"
|
label="&forwardButton.label;"
|
||||||
oncommand="if (event.target==this) BrowserForward(); else gotoHistoryIndex(event);"
|
oncommand="if (event.target==this) BrowserForward(); else gotoHistoryIndex(event);"
|
||||||
observes="canGoForward" context="forwardMenu"
|
observes="canGoForward" context="forwardMenu"
|
||||||
|
@ -159,19 +160,19 @@
|
||||||
<menupopup context="" onpopupshowing="BrowserForwardMenu(event);"/>
|
<menupopup context="" onpopupshowing="BrowserForwardMenu(event);"/>
|
||||||
</toolbarbutton>
|
</toolbarbutton>
|
||||||
|
|
||||||
<toolbarbutton id="reload-button" class="toolbarbutton-1"
|
<toolbarbutton id="reload-button"
|
||||||
|
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||||
label="&reloadButton.label;"
|
label="&reloadButton.label;"
|
||||||
oncommand="if (event.shiftKey) BrowserReloadSkipCache(); else BrowserReload();"
|
oncommand="if (event.shiftKey) BrowserReloadSkipCache(); else BrowserReload();"
|
||||||
tooltiptext="&reloadButton.tooltip;"/>
|
tooltiptext="&reloadButton.tooltip;"/>
|
||||||
|
|
||||||
<toolbarbutton id="stop-button" class="toolbarbutton-1"
|
<toolbarbutton id="stop-button"
|
||||||
|
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||||
label="&stopButton.label;"
|
label="&stopButton.label;"
|
||||||
oncommand="BrowserStop();" observes="canStop"
|
oncommand="BrowserStop();" observes="canStop"
|
||||||
tooltiptext="&stopButton.tooltip;"/>
|
tooltiptext="&stopButton.tooltip;"/>
|
||||||
</hbox>
|
|
||||||
|
|
||||||
<hbox id="nav-bar-inner" flex="1">
|
<hbox id="nav-bar-inner" flex="1">
|
||||||
<observes element="nav-bar" attribute="buttonstyle"/>
|
|
||||||
<!-- Need hidden label on textbox for accessibility, because what
|
<!-- Need hidden label on textbox for accessibility, because what
|
||||||
receives focus needs a text name -->
|
receives focus needs a text name -->
|
||||||
<label control="urlbar" hidden="true" value="&locationBar.title;"/>
|
<label control="urlbar" hidden="true" value="&locationBar.title;"/>
|
||||||
|
@ -225,7 +226,8 @@
|
||||||
tooltiptext="&searchButton.tooltip;"/>
|
tooltiptext="&searchButton.tooltip;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
||||||
<toolbarbutton id="print-button" type="menu-button" class="toolbarbutton-1"
|
<toolbarbutton id="print-button" type="menu-button"
|
||||||
|
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||||
label="&printButton.label;"
|
label="&printButton.label;"
|
||||||
oncommand="if (event.target==this) PrintUtils.print();"
|
oncommand="if (event.target==this) PrintUtils.print();"
|
||||||
tooltiptext="&printButton.tooltip;">
|
tooltiptext="&printButton.tooltip;">
|
||||||
|
|
|
@ -198,27 +198,13 @@
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
if (topic == "nsPref:changed" && name == this.domain) {
|
if (topic == "nsPref:changed" && name == this.domain) {
|
||||||
const styles = ["pictures", "text", null];
|
const styles = ["icons", "text", null];
|
||||||
const style = styles[this.prefs.getIntPref(name)];
|
const style = styles[this.prefs.getIntPref(name)];
|
||||||
this.setAttribute("buttonstyle", style);
|
this.setAttribute("mode", style);
|
||||||
this.update("toolbarbutton", style);
|
|
||||||
this.update("button", style);
|
|
||||||
}
|
}
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
<method name="update">
|
|
||||||
<parameter name="tag"/>
|
|
||||||
<parameter name="style"/>
|
|
||||||
<body>
|
|
||||||
<![CDATA[
|
|
||||||
var elements = this.getElementsByTagName(tag);
|
|
||||||
for (var i = 0; i < elements.length; i++)
|
|
||||||
elements[i].setAttribute("buttonstyle", style);
|
|
||||||
]]>
|
|
||||||
</body>
|
|
||||||
</method>
|
|
||||||
</implementation>
|
</implementation>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
||||||
|
|
|
@ -61,14 +61,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
window[chromehidden~="toolbar"] #navigator-throbber,
|
window[chromehidden~="toolbar"] #navigator-throbber,
|
||||||
#navigator-throbber[buttonstyle="text"],
|
toolbar[mode="text"] #navigator-throbber,
|
||||||
#navigator-throbber[toolbarmode="small"] {
|
#navigator-throbber[toolbarmode="small"] {
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
list-style-image: url("chrome://communicator/skin/brand/throbber16-single.gif");
|
list-style-image: url("chrome://communicator/skin/brand/throbber16-single.gif");
|
||||||
}
|
}
|
||||||
|
|
||||||
window[chromehidden~="toolbar"] #navigator-throbber[busy="true"],
|
window[chromehidden~="toolbar"] #navigator-throbber[busy="true"],
|
||||||
#navigator-throbber[buttonstyle="text"][busy="true"],
|
toolbar[mode="text"] #navigator-throbber[busy="true"],
|
||||||
#navigator-throbber[toolbarmode="small"][busy="true"] {
|
#navigator-throbber[toolbarmode="small"][busy="true"] {
|
||||||
list-style-image: url("chrome://communicator/skin/brand/throbber16-anim.gif");
|
list-style-image: url("chrome://communicator/skin/brand/throbber16-anim.gif");
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,13 +60,13 @@
|
||||||
-moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu-vertical");
|
-moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu-vertical");
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-1[buttonstyle="pictures"],
|
toolbar[mode="icons"] .toolbarbutton-1,
|
||||||
.toolbarbutton-menubutton-button[buttonstyle="pictures"] {
|
toolbar[mode="icons"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||||
min-width: 0px;
|
min-width: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-text[buttonstyle="pictures"],
|
toolbar[mode="icons"] .toolbarbutton-1 .toolbarbutton-text,
|
||||||
.toolbarbutton-icon[buttonstyle="text"] {
|
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-icon {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,13 +77,13 @@
|
||||||
-moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu-vertical");
|
-moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu-vertical");
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-1[buttonstyle="pictures"],
|
toolbar[mode="icons"] .toolbarbutton-1,
|
||||||
.toolbarbutton-menubutton-button[buttonstyle="pictures"] {
|
toolbar[mode="icons"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||||
min-width: 0px;
|
min-width: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-text[buttonstyle="pictures"],
|
toolbar[mode="icons"] .toolbarbutton-1 .toolbarbutton-text,
|
||||||
.toolbarbutton-icon[buttonstyle="text"] {
|
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-icon {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -158,7 +158,7 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-text[buttonstyle="text"] {
|
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-text {
|
||||||
padding: 4px 0;
|
padding: 4px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,19 +62,19 @@
|
||||||
background: url("chrome://communicator/skin/toolbar/prtb-bg-noline.gif") #B1BDC9 repeat-x top;
|
background: url("chrome://communicator/skin/toolbar/prtb-bg-noline.gif") #B1BDC9 repeat-x top;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-throbber[buttonstyle="pictures"] {
|
toolbar[mode="icons"] #navigator-throbber {
|
||||||
margin: 4px 8px 2px 8px;
|
margin: 4px 8px 2px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
window[chromehidden~="toolbar"] #navigator-throbber,
|
window[chromehidden~="toolbar"] #navigator-throbber,
|
||||||
#navigator-throbber[buttonstyle="text"],
|
toolbar[mode="text"] #navigator-throbber,
|
||||||
#navigator-throbber[toolbarmode="small"] {
|
#navigator-throbber[toolbarmode="small"] {
|
||||||
margin: 2px 4px 2px 6px;
|
margin: 2px 4px 2px 6px;
|
||||||
list-style-image: url("chrome://communicator/skin/brand/throbber16-single.gif");
|
list-style-image: url("chrome://communicator/skin/brand/throbber16-single.gif");
|
||||||
}
|
}
|
||||||
|
|
||||||
window[chromehidden~="toolbar"] #navigator-throbber[busy="true"],
|
window[chromehidden~="toolbar"] #navigator-throbber[busy="true"],
|
||||||
#navigator-throbber[buttonstyle="text"][busy="true"],
|
toolbar[mode="text"] #navigator-throbber[busy="true"],
|
||||||
#navigator-throbber[toolbarmode="small"][busy="true"] {
|
#navigator-throbber[toolbarmode="small"][busy="true"] {
|
||||||
list-style-image: url("chrome://communicator/skin/brand/throbber16-anim.gif");
|
list-style-image: url("chrome://communicator/skin/brand/throbber16-anim.gif");
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,20 +82,22 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-1[buttonstyle="text"] {
|
toolbar[mode="text"] .toolbarbutton-1 {
|
||||||
min-width: 46px;
|
min-width: 46px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-text[buttonstyle="pictures"],
|
toolbar[mode="icons"] .toolbarbutton-1 .toolbarbutton-text,
|
||||||
.toolbarbutton-icon[buttonstyle="text"] {
|
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-icon {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-menubutton-dropmarker[buttonstyle="pictures"] {
|
toolbar[mode="icons"] .toolbarbutton-1 > .toolbarbutton-menubutton-stack
|
||||||
|
> .toolbarbutton-menubutton-dropmarker {
|
||||||
margin: 20px 0px 0px 40px;
|
margin: 20px 0px 0px 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-menubutton-dropmarker[buttonstyle="text"] {
|
toolbar[mode="text"] .toolbarbutton-1 > .toolbarbutton-menubutton-stack
|
||||||
|
> .toolbarbutton-menubutton-dropmarker {
|
||||||
margin: 8px 0px 0px 40px;
|
margin: 8px 0px 0px 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,8 @@
|
||||||
border-left: none;
|
border-left: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbar-primary-holder[buttonstyle="pictures"],
|
.toolbar-primary-holder[mode="icons"],
|
||||||
.toolbar-primary-holder[buttonstyle="text"] {
|
.toolbar-primary-holder[mode="text"] {
|
||||||
background-image: url("chrome://communicator/skin/toolbar/prtb-bg-noline.gif");
|
background-image: url("chrome://communicator/skin/toolbar/prtb-bg-noline.gif");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,18 +68,17 @@
|
||||||
background-position: top;
|
background-position: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbar-primary-icon[buttonstyle="pictures"],
|
.toolbar-primary-icon[mode="icons"],
|
||||||
.toolbar-primary-icon[buttonstyle="text"] {
|
.toolbar-primary-icon[mode="text"] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-1[buttonstyle="text"] > stack > .toolbarbutton-menubutton-dropmarker {
|
toolbar[mode="text"] .toolbarbutton-1 > .toolbarbutton-menubutton-stack
|
||||||
|
> .toolbarbutton-menubutton-dropmarker {
|
||||||
margin: 0px 2px 0px 38px !important;
|
margin: 0px 2px 0px 38px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-1[buttonstyle="text"] > stack > .toolbarbutton-menubutton-button
|
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-text {
|
||||||
> .toolbarbutton-text,
|
|
||||||
.toolbarbutton-1[buttonstyle="text"] > .toolbarbutton-text {
|
|
||||||
margin: 5px 0px !important;
|
margin: 5px 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,8 +53,8 @@
|
||||||
<content>
|
<content>
|
||||||
<xul:toolbargrippy xbl:inherits="last-toolbar"
|
<xul:toolbargrippy xbl:inherits="last-toolbar"
|
||||||
tbattr="toolbar-grippy" class="toolbar-primary-grippy"/>
|
tbattr="toolbar-grippy" class="toolbar-primary-grippy"/>
|
||||||
<xul:hbox class="toolbar-holder toolbar-primary-holder" flex="1" xbl:inherits="buttonstyle">
|
<xul:hbox class="toolbar-holder toolbar-primary-holder" flex="1" xbl:inherits="mode">
|
||||||
<xul:image class="toolbar-primary-icon" xbl:inherits="buttonstyle"/>
|
<xul:image class="toolbar-primary-icon" xbl:inherits="mode"/>
|
||||||
<xul:hbox class="toolbar-button-box" flex="1">
|
<xul:hbox class="toolbar-button-box" flex="1">
|
||||||
<children/>
|
<children/>
|
||||||
</xul:hbox>
|
</xul:hbox>
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
<xul:toolbarbutton class="box-inherit toolbarbutton-menubutton-button"
|
<xul:toolbarbutton class="box-inherit toolbarbutton-menubutton-button"
|
||||||
anonid="button" allowevents="true"
|
anonid="button" allowevents="true"
|
||||||
xbl:inherits="disabled,image,label,crop,accesskey,command,
|
xbl:inherits="disabled,image,label,crop,accesskey,command,
|
||||||
buttonover,buttondown,align,dir,pack,orient,toolbarmode,buttonstyle"/>
|
buttonover,buttondown,align,dir,pack,orient,toolbarmode"/>
|
||||||
<xul:dropmarker type="menu-button" xbl:inherits="open,disabled,toolbarmode,buttonstyle"
|
<xul:dropmarker type="menu-button" xbl:inherits="open,disabled,toolbarmode"
|
||||||
class="toolbarbutton-menubutton-dropmarker"/>
|
class="toolbarbutton-menubutton-dropmarker"/>
|
||||||
</xul:stack>
|
</xul:stack>
|
||||||
</content>
|
</content>
|
||||||
|
|
|
@ -71,7 +71,8 @@
|
||||||
-moz-image-region: rect(102px 199px 135px 150px) !important;
|
-moz-image-region: rect(102px 199px 135px 150px) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#button-getmsg[buttonstyle="text"] > stack > .toolbarbutton-menubutton-dropmarker {
|
toolbar[mode="text"] #button-getmsg > .toolbarbutton-menubutton-stack
|
||||||
|
> .toolbarbutton-menubutton-dropmarker {
|
||||||
margin: 0px 2px 0px 55px !important;
|
margin: 0px 2px 0px 55px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,20 +157,17 @@ toolbox {
|
||||||
display: inline !important;
|
display: inline !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#forward-button[buttonstyle="text"] > stack > .toolbarbutton-menubutton-dropmarker {
|
toolbar[mode="text"] #forward-button > .toolbarbutton-menubutton-stack
|
||||||
|
> .toolbarbutton-menubutton-dropmarker {
|
||||||
margin: 0px 2px 0px 56px !important;
|
margin: 0px 2px 0px 56px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-1[buttonstyle="text"] > stack > .toolbarbutton-menubutton-button
|
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-text {
|
||||||
> .toolbarbutton-text,
|
|
||||||
.toolbarbutton-1[buttonstyle="text"] > .toolbarbutton-text {
|
|
||||||
display: -moz-box !important;
|
display: -moz-box !important;
|
||||||
margin-top: 10px !important;
|
margin-top: 10px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbarbutton-1[buttonstyle="text"] > stack > .toolbarbutton-menubutton-button
|
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-icon {
|
||||||
> .toolbarbutton-icon,
|
|
||||||
.toolbarbutton-1[buttonstyle="text"] > .toolbarbutton-icon {
|
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,10 +276,6 @@ toolbox {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar[toolbarmode="small"] > #nav-bar-buttons {
|
|
||||||
-moz-box-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#nav-bar[toolbarmode="small"] > .toolbar-primary-grippy {
|
#nav-bar[toolbarmode="small"] > .toolbar-primary-grippy {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -386,10 +379,6 @@ toolbox {
|
||||||
background-image: url("chrome://communicator/skin/toolbar/prtb-bg-noline.gif");
|
background-image: url("chrome://communicator/skin/toolbar/prtb-bg-noline.gif");
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar-buttons {
|
|
||||||
margin: 0px 0px 3px 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ::::: navbar-inner - the grooved area around the urlbar ::::: */
|
/* ::::: navbar-inner - the grooved area around the urlbar ::::: */
|
||||||
|
|
||||||
#nav-bar-inner {
|
#nav-bar-inner {
|
||||||
|
@ -405,20 +394,22 @@ toolbox {
|
||||||
min-width: 0px;
|
min-width: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nav-bar-inner[buttonstyle="text"] {
|
toolbar[mode="text"] #nav-bar-inner {
|
||||||
margin: 2px 0px 2px 5px;
|
margin: 2px 0px 2px 5px;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search-button[buttonstyle="text"] {
|
toolbar[mode="text"] #nav-bar-inner > #search-button {
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search-button[buttonstyle="text"] > .button-box > .button-icon {
|
toolbar[mode="text"] #nav-bar-inner > #search-button > .button-box
|
||||||
|
> .button-icon {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search-button[buttonstyle="pictures"] > .button-box > .button-text {
|
toolbar[mode="icons"] #nav-bar-inner > #search-button > .button-box
|
||||||
|
> .button-text {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче