зеркало из 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"
|
||||
grippytooltiptext="&navigationToolbar.tooltip;"
|
||||
fullscreentoolbar="true">
|
||||
<hbox id="nav-bar-buttons">
|
||||
<toolbarbutton id="back-button" type="menu-button" class="toolbarbutton-1"
|
||||
<toolbarbutton id="back-button" type="menu-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&backButton.label;"
|
||||
oncommand="if (event.target==this) BrowserBack(); else gotoHistoryIndex(event);"
|
||||
observes="canGoBack" context="backMenu"
|
||||
|
@ -151,7 +151,8 @@
|
|||
<menupopup context="" onpopupshowing="BrowserBackMenu(event);"/>
|
||||
</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;"
|
||||
oncommand="if (event.target==this) BrowserForward(); else gotoHistoryIndex(event);"
|
||||
observes="canGoForward" context="forwardMenu"
|
||||
|
@ -159,19 +160,19 @@
|
|||
<menupopup context="" onpopupshowing="BrowserForwardMenu(event);"/>
|
||||
</toolbarbutton>
|
||||
|
||||
<toolbarbutton id="reload-button" class="toolbarbutton-1"
|
||||
<toolbarbutton id="reload-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&reloadButton.label;"
|
||||
oncommand="if (event.shiftKey) BrowserReloadSkipCache(); else BrowserReload();"
|
||||
tooltiptext="&reloadButton.tooltip;"/>
|
||||
|
||||
<toolbarbutton id="stop-button" class="toolbarbutton-1"
|
||||
<toolbarbutton id="stop-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&stopButton.label;"
|
||||
oncommand="BrowserStop();" observes="canStop"
|
||||
tooltiptext="&stopButton.tooltip;"/>
|
||||
</hbox>
|
||||
|
||||
<hbox id="nav-bar-inner" flex="1">
|
||||
<observes element="nav-bar" attribute="buttonstyle"/>
|
||||
<!-- Need hidden label on textbox for accessibility, because what
|
||||
receives focus needs a text name -->
|
||||
<label control="urlbar" hidden="true" value="&locationBar.title;"/>
|
||||
|
@ -225,7 +226,8 @@
|
|||
tooltiptext="&searchButton.tooltip;"/>
|
||||
</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;"
|
||||
oncommand="if (event.target==this) PrintUtils.print();"
|
||||
tooltiptext="&printButton.tooltip;">
|
||||
|
|
|
@ -198,27 +198,13 @@
|
|||
<body>
|
||||
<![CDATA[
|
||||
if (topic == "nsPref:changed" && name == this.domain) {
|
||||
const styles = ["pictures", "text", null];
|
||||
const styles = ["icons", "text", null];
|
||||
const style = styles[this.prefs.getIntPref(name)];
|
||||
this.setAttribute("buttonstyle", style);
|
||||
this.update("toolbarbutton", style);
|
||||
this.update("button", style);
|
||||
this.setAttribute("mode", style);
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</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>
|
||||
</binding>
|
||||
|
||||
|
|
|
@ -61,14 +61,14 @@
|
|||
}
|
||||
|
||||
window[chromehidden~="toolbar"] #navigator-throbber,
|
||||
#navigator-throbber[buttonstyle="text"],
|
||||
toolbar[mode="text"] #navigator-throbber,
|
||||
#navigator-throbber[toolbarmode="small"] {
|
||||
margin: 0 5px;
|
||||
list-style-image: url("chrome://communicator/skin/brand/throbber16-single.gif");
|
||||
}
|
||||
|
||||
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"] {
|
||||
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");
|
||||
}
|
||||
|
||||
.toolbarbutton-1[buttonstyle="pictures"],
|
||||
.toolbarbutton-menubutton-button[buttonstyle="pictures"] {
|
||||
toolbar[mode="icons"] .toolbarbutton-1,
|
||||
toolbar[mode="icons"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
min-width: 0px;
|
||||
}
|
||||
|
||||
.toolbarbutton-text[buttonstyle="pictures"],
|
||||
.toolbarbutton-icon[buttonstyle="text"] {
|
||||
toolbar[mode="icons"] .toolbarbutton-1 .toolbarbutton-text,
|
||||
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,13 +77,13 @@
|
|||
-moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu-vertical");
|
||||
}
|
||||
|
||||
.toolbarbutton-1[buttonstyle="pictures"],
|
||||
.toolbarbutton-menubutton-button[buttonstyle="pictures"] {
|
||||
toolbar[mode="icons"] .toolbarbutton-1,
|
||||
toolbar[mode="icons"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
min-width: 0px;
|
||||
}
|
||||
|
||||
.toolbarbutton-text[buttonstyle="pictures"],
|
||||
.toolbarbutton-icon[buttonstyle="text"] {
|
||||
toolbar[mode="icons"] .toolbarbutton-1 .toolbarbutton-text,
|
||||
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.toolbarbutton-text[buttonstyle="text"] {
|
||||
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-text {
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,19 +62,19 @@
|
|||
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;
|
||||
}
|
||||
|
||||
window[chromehidden~="toolbar"] #navigator-throbber,
|
||||
#navigator-throbber[buttonstyle="text"],
|
||||
toolbar[mode="text"] #navigator-throbber,
|
||||
#navigator-throbber[toolbarmode="small"] {
|
||||
margin: 2px 4px 2px 6px;
|
||||
list-style-image: url("chrome://communicator/skin/brand/throbber16-single.gif");
|
||||
}
|
||||
|
||||
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"] {
|
||||
list-style-image: url("chrome://communicator/skin/brand/throbber16-anim.gif");
|
||||
}
|
||||
|
|
|
@ -82,20 +82,22 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.toolbarbutton-1[buttonstyle="text"] {
|
||||
toolbar[mode="text"] .toolbarbutton-1 {
|
||||
min-width: 46px;
|
||||
}
|
||||
|
||||
.toolbarbutton-text[buttonstyle="pictures"],
|
||||
.toolbarbutton-icon[buttonstyle="text"] {
|
||||
toolbar[mode="icons"] .toolbarbutton-1 .toolbarbutton-text,
|
||||
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.toolbarbutton-menubutton-dropmarker[buttonstyle="pictures"] {
|
||||
toolbar[mode="icons"] .toolbarbutton-1 > .toolbarbutton-menubutton-stack
|
||||
> .toolbarbutton-menubutton-dropmarker {
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
border-left: none;
|
||||
}
|
||||
|
||||
.toolbar-primary-holder[buttonstyle="pictures"],
|
||||
.toolbar-primary-holder[buttonstyle="text"] {
|
||||
.toolbar-primary-holder[mode="icons"],
|
||||
.toolbar-primary-holder[mode="text"] {
|
||||
background-image: url("chrome://communicator/skin/toolbar/prtb-bg-noline.gif");
|
||||
}
|
||||
|
||||
|
@ -68,18 +68,17 @@
|
|||
background-position: top;
|
||||
}
|
||||
|
||||
.toolbar-primary-icon[buttonstyle="pictures"],
|
||||
.toolbar-primary-icon[buttonstyle="text"] {
|
||||
.toolbar-primary-icon[mode="icons"],
|
||||
.toolbar-primary-icon[mode="text"] {
|
||||
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;
|
||||
}
|
||||
|
||||
.toolbarbutton-1[buttonstyle="text"] > stack > .toolbarbutton-menubutton-button
|
||||
> .toolbarbutton-text,
|
||||
.toolbarbutton-1[buttonstyle="text"] > .toolbarbutton-text {
|
||||
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-text {
|
||||
margin: 5px 0px !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,8 +53,8 @@
|
|||
<content>
|
||||
<xul:toolbargrippy xbl:inherits="last-toolbar"
|
||||
tbattr="toolbar-grippy" class="toolbar-primary-grippy"/>
|
||||
<xul:hbox class="toolbar-holder toolbar-primary-holder" flex="1" xbl:inherits="buttonstyle">
|
||||
<xul:image class="toolbar-primary-icon" xbl:inherits="buttonstyle"/>
|
||||
<xul:hbox class="toolbar-holder toolbar-primary-holder" flex="1" xbl:inherits="mode">
|
||||
<xul:image class="toolbar-primary-icon" xbl:inherits="mode"/>
|
||||
<xul:hbox class="toolbar-button-box" flex="1">
|
||||
<children/>
|
||||
</xul:hbox>
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
<xul:toolbarbutton class="box-inherit toolbarbutton-menubutton-button"
|
||||
anonid="button" allowevents="true"
|
||||
xbl:inherits="disabled,image,label,crop,accesskey,command,
|
||||
buttonover,buttondown,align,dir,pack,orient,toolbarmode,buttonstyle"/>
|
||||
<xul:dropmarker type="menu-button" xbl:inherits="open,disabled,toolbarmode,buttonstyle"
|
||||
buttonover,buttondown,align,dir,pack,orient,toolbarmode"/>
|
||||
<xul:dropmarker type="menu-button" xbl:inherits="open,disabled,toolbarmode"
|
||||
class="toolbarbutton-menubutton-dropmarker"/>
|
||||
</xul:stack>
|
||||
</content>
|
||||
|
|
|
@ -71,7 +71,8 @@
|
|||
-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;
|
||||
}
|
||||
|
||||
|
|
|
@ -157,20 +157,17 @@ toolbox {
|
|||
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;
|
||||
}
|
||||
|
||||
.toolbarbutton-1[buttonstyle="text"] > stack > .toolbarbutton-menubutton-button
|
||||
> .toolbarbutton-text,
|
||||
.toolbarbutton-1[buttonstyle="text"] > .toolbarbutton-text {
|
||||
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-text {
|
||||
display: -moz-box !important;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
|
||||
.toolbarbutton-1[buttonstyle="text"] > stack > .toolbarbutton-menubutton-button
|
||||
> .toolbarbutton-icon,
|
||||
.toolbarbutton-1[buttonstyle="text"] > .toolbarbutton-icon {
|
||||
toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-icon {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
@ -279,10 +276,6 @@ toolbox {
|
|||
border: none;
|
||||
}
|
||||
|
||||
#nav-bar[toolbarmode="small"] > #nav-bar-buttons {
|
||||
-moz-box-align: center;
|
||||
}
|
||||
|
||||
#nav-bar[toolbarmode="small"] > .toolbar-primary-grippy {
|
||||
display: none;
|
||||
}
|
||||
|
@ -386,10 +379,6 @@ toolbox {
|
|||
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 ::::: */
|
||||
|
||||
#nav-bar-inner {
|
||||
|
@ -405,20 +394,22 @@ toolbox {
|
|||
min-width: 0px;
|
||||
}
|
||||
|
||||
#nav-bar-inner[buttonstyle="text"] {
|
||||
toolbar[mode="text"] #nav-bar-inner {
|
||||
margin: 2px 0px 2px 5px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
#search-button[buttonstyle="text"] {
|
||||
toolbar[mode="text"] #nav-bar-inner > #search-button {
|
||||
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;
|
||||
}
|
||||
|
||||
#search-button[buttonstyle="pictures"] > .button-box > .button-text {
|
||||
toolbar[mode="icons"] #nav-bar-inner > #search-button > .button-box
|
||||
> .button-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче