зеркало из https://github.com/mozilla/pjs.git
bug 235872 - add description property to menuitems
r=neil, sr=bryner
This commit is contained in:
Родитель
82b22a64d5
Коммит
c468f8ad80
|
@ -82,6 +82,12 @@ menuitem[_moz-menuactive="true"][disabled="true"] {
|
|||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.menu-description {
|
||||
font-style: italic;
|
||||
color: GrayText;
|
||||
margin-left: 1ex !important;
|
||||
}
|
||||
|
||||
.menu-accel {
|
||||
margin-left: 4px;
|
||||
padding-right: 14px;
|
||||
|
|
|
@ -68,6 +68,12 @@ menulist {
|
|||
margin: 1px 3px !important;
|
||||
}
|
||||
|
||||
.menulist-description {
|
||||
font-style: italic;
|
||||
color: GrayText;
|
||||
margin-left: 1ex !important;
|
||||
}
|
||||
|
||||
/* ..... disabled state ..... */
|
||||
|
||||
menulist[disabled="true"] {
|
||||
|
|
|
@ -77,6 +77,12 @@ menuitem[_moz-menuactive="true"][disabled="true"] {
|
|||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.menu-description {
|
||||
font-style: italic;
|
||||
color: GrayText;
|
||||
margin-left: 1ex !important;
|
||||
}
|
||||
|
||||
.menu-accel,
|
||||
.menu-iconic-accel {
|
||||
margin: 0px 2px 0px 7px !important;
|
||||
|
|
|
@ -74,6 +74,12 @@ menulist[open="true"]:focus > .menulist-label-box {
|
|||
margin: 1px 3px !important;
|
||||
}
|
||||
|
||||
.menulist-description {
|
||||
font-style: italic;
|
||||
color: GrayText;
|
||||
margin-left: 1ex !important;
|
||||
}
|
||||
|
||||
/* ..... dropmarker ..... */
|
||||
|
||||
.menulist-dropmarker {
|
||||
|
|
|
@ -77,6 +77,12 @@ menuitem[_moz-menuactive="true"][disabled="true"] {
|
|||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.menu-description {
|
||||
font-style: italic;
|
||||
color: #8C99AB;
|
||||
margin-left: 1ex !important;
|
||||
}
|
||||
|
||||
.menu-accel,
|
||||
.menu-iconic-accel {
|
||||
margin: 0px 2px 0px 7px !important;
|
||||
|
|
|
@ -56,6 +56,12 @@ menulist {
|
|||
margin: 0 2px 0 0 !important;
|
||||
}
|
||||
|
||||
.menulist-description {
|
||||
font-style: italic;
|
||||
color: #5D616E;
|
||||
margin-left: 1em !important;
|
||||
}
|
||||
|
||||
.menulist-icon {
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
|
|
@ -98,6 +98,17 @@
|
|||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="menuitem-iconic-desc-noaccel" extends="chrome://global/content/bindings/menu.xml#menuitem">
|
||||
<content>
|
||||
<xul:hbox class="menu-iconic-left" align="center" pack="center"
|
||||
xbl:inherits="selected,disabled,checked">
|
||||
<xul:image class="menu-iconic-icon" xbl:inherits="src=image,validate,src"/>
|
||||
</xul:hbox>
|
||||
<xul:label class="menu-iconic-text" xbl:inherits="value=label,accesskey,crop" crop="right" flex="1"/>
|
||||
<xul:label class="menu-iconic-text menu-description" xbl:inherits="value=description" crop="right" flex="10000"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="menu-iconic" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
|
||||
<content>
|
||||
<xul:hbox class="menu-iconic-left" align="center" pack="center">
|
||||
|
|
|
@ -93,6 +93,8 @@
|
|||
onget="return this.getAttribute('src');"/>
|
||||
<property name="label" onset="this.setAttribute('label',val); return val;"
|
||||
onget="return this.getAttribute('label');"/>
|
||||
<property name="description" onset="this.setAttribute('description',val); return val;"
|
||||
onget="return this.getAttribute('description');"/>
|
||||
<property name="disabled" onset="if (val) this.setAttribute('disabled',true);
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"
|
||||
|
@ -170,6 +172,7 @@
|
|||
this.removeAttribute('value');
|
||||
this.removeAttribute('src');
|
||||
this.removeAttribute('label');
|
||||
this.removeAttribute('description');
|
||||
return val;
|
||||
}
|
||||
|
||||
|
@ -178,6 +181,7 @@
|
|||
this.setAttribute('value', val.getAttribute('value'));
|
||||
this.setAttribute('src', val.getAttribute('src'));
|
||||
this.setAttribute('label', val.getAttribute('label'));
|
||||
this.setAttribute('description', val.getAttribute('description'));
|
||||
|
||||
return val;
|
||||
]]>
|
||||
|
@ -187,6 +191,7 @@
|
|||
<method name="appendItem">
|
||||
<parameter name="label"/>
|
||||
<parameter name="value"/>
|
||||
<parameter name="description"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
@ -195,6 +200,8 @@
|
|||
var item = document.createElementNS(XULNS, "menuitem");
|
||||
item.setAttribute("label", label);
|
||||
item.setAttribute("value", value);
|
||||
item.setAttribute("description", description);
|
||||
|
||||
popup.appendChild(item);
|
||||
return item;
|
||||
]]>
|
||||
|
@ -205,6 +212,7 @@
|
|||
<parameter name="index"/>
|
||||
<parameter name="label"/>
|
||||
<parameter name="value"/>
|
||||
<parameter name="description"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
@ -213,6 +221,8 @@
|
|||
var item = document.createElementNS(XULNS, "menuitem");
|
||||
item.setAttribute("label", label);
|
||||
item.setAttribute("value", value);
|
||||
item.setAttribute("description", description);
|
||||
|
||||
if (index < popup.childNodes.length)
|
||||
popup.insertBefore(item, popup.childNodes[index]);
|
||||
else
|
||||
|
@ -449,5 +459,17 @@
|
|||
<children includes="menupopup"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
|
||||
<binding id="menulist-description" display="xul:menu"
|
||||
extends="chrome://global/content/bindings/menulist.xml#menulist">
|
||||
<content sizetopopup="pref">
|
||||
<xul:hbox class="menulist-label-box" flex="1">
|
||||
<xul:image class="menulist-icon" xbl:inherits="src"/>
|
||||
<xul:label class="menulist-label" xbl:inherits="value=label,crop,accesskey" crop="right" flex="1"/>
|
||||
<xul:label class="menulist-label menulist-description" xbl:inherits="value=description" crop="right" flex="10000"/>
|
||||
</xul:hbox>
|
||||
<xul:dropmarker class="menulist-dropmarker" type="menu"/>
|
||||
<children includes="menupopup"/>
|
||||
</content>
|
||||
</binding>
|
||||
</bindings>
|
||||
|
|
|
@ -275,6 +275,10 @@ menuitem.menuitem-iconic {
|
|||
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic");
|
||||
}
|
||||
|
||||
menuitem[description] {
|
||||
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic-desc-noaccel");
|
||||
}
|
||||
|
||||
menuitem[type="checkbox"],
|
||||
menuitem[type="radio"] {
|
||||
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic");
|
||||
|
@ -770,6 +774,10 @@ menulist {
|
|||
-moz-binding: url("chrome://global/content/bindings/menulist.xml#menulist");
|
||||
}
|
||||
|
||||
menulist[type="description"] {
|
||||
-moz-binding: url("chrome://global/content/bindings/menulist.xml#menulist-description");
|
||||
}
|
||||
|
||||
menulist[editable] {
|
||||
-moz-binding: url("chrome://global/content/bindings/menulist.xml#menulist-editable");
|
||||
}
|
||||
|
|
|
@ -1,202 +0,0 @@
|
|||
/*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Joe Hewitt (hewitt@netscape.com)
|
||||
*
|
||||
*/
|
||||
|
||||
/* ===== menu.css =======================================================
|
||||
== Styles used by XUL menu-related elements.
|
||||
======================================================================= */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
/* ::::: menu/menuitem ::::: */
|
||||
|
||||
menu, menuitem {
|
||||
-moz-appearance: menuitem !important;
|
||||
-moz-box-align: center;
|
||||
max-width: 42em;
|
||||
color: MenuText;
|
||||
font: menu;
|
||||
list-style-image: none;
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menuitem[default="true"] {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
menu[_moz-menuactive="true"],
|
||||
menuitem[_moz-menuactive="true"] {
|
||||
color: HighlightText;
|
||||
}
|
||||
|
||||
menu[disabled="true"],
|
||||
menuitem[disabled="true"] {
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
menubar > menu {
|
||||
padding: 0px 6px 0px 4px;
|
||||
}
|
||||
|
||||
menubar > menu[_moz-menuactive="true"] {
|
||||
color: MenuText;
|
||||
}
|
||||
|
||||
menubar > menu[open] {
|
||||
color: HighlightText;
|
||||
}
|
||||
|
||||
/* ::::: menu/menuitems in menulist popups ::::: */
|
||||
|
||||
.menulist-menupopup > menuitem,
|
||||
menulist > menupopup > menuitem,
|
||||
.menulist-menupopup > menu,
|
||||
menulist > menupopup > menu {
|
||||
padding: 1px 30px 1px 5px;
|
||||
max-width: none;
|
||||
font: message-box;
|
||||
}
|
||||
|
||||
/* ..... internal content .... */
|
||||
|
||||
.menu-text,
|
||||
.menu-iconic-left,
|
||||
.menu-iconic-text {
|
||||
margin: 0px 2px 0px 0px !important;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.menu-text {
|
||||
margin-left: 18px !important;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.menu-accel,
|
||||
.menu-iconic-accel {
|
||||
margin: 0px 2px 0px 7px !important;
|
||||
padding-right: 14px;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.menu-iconic-left {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.menu-right {
|
||||
margin: 0px 0px 0px 6px;
|
||||
width: 8px;
|
||||
list-style-image: url("chrome://global/skin/menu/Menu-arrow.png");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
.menu-right[_moz-menuactive="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/Menu-arrow-hover.png");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
.menu-right[disabled="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/Menu-arrow-disabled.png");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
.menubar-left {
|
||||
margin: 0px 2px 0px 0px;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.menubar-text {
|
||||
margin: 0px 2px 0px 0px !important;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
|
||||
.menulist-menupopup > menuitem > .menu-iconic-left,
|
||||
menulist > menupopup > menuitem > .menu-iconic-left,
|
||||
.menulist-menupopup > menu > .menu-iconic-left,
|
||||
menulist > menupopup > menu > .menu-iconic-left {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ::::: checkbox menuitem ::::: */
|
||||
|
||||
menuitem[checked="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-check.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menuitem[checked="true"][disabled="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-check-disabled.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menuitem[checked="true"][_moz-menuactive="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-check-hover.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
/* ::::: radio menuitem ::::: */
|
||||
|
||||
menuitem[checked="true"][type="radio"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-radio.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menuitem[checked="true"][type="radio"][disabled="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-radio-disabled.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menuitem[checked="true"][type="radio"][_moz-menuactive="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-radio-hover.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
/* ::::: menuseparator ::::: */
|
||||
|
||||
menuseparator {
|
||||
margin: 2px 3px;
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
border-bottom: 1px solid ThreeDHighlight;
|
||||
}
|
||||
|
||||
menulist > menupopup > menuseparator,
|
||||
.menulist-menupopup > menuseparator {
|
||||
margin: 2px 0;
|
||||
border-top: 1px solid #000000;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* ::::: autocomplete ::::: */
|
||||
|
||||
.autocomplete-history-popup > menuitem {
|
||||
max-width: none !important;
|
||||
font: message-box;
|
||||
}
|
||||
|
||||
/* ::::: tree column picker ::::: */
|
||||
|
||||
.treecell-popupcell-menu {
|
||||
margin-left: -2px;
|
||||
list-style-image: url("chrome://global/skin/columnselect.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
|
@ -1,200 +0,0 @@
|
|||
/*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Joe Hewitt (hewitt@netscape.com)
|
||||
* Kevin Gerich (webmail@kmgerich.com)
|
||||
*
|
||||
*/
|
||||
|
||||
/* ===== menu.css =======================================================
|
||||
== Styles used by XUL menu-related elements.
|
||||
======================================================================= */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
/* ::::: menu/menuitem ::::: */
|
||||
|
||||
menu,
|
||||
menuitem {
|
||||
-moz-appearance: none !important;
|
||||
-moz-box-align: center;
|
||||
color: #000000;
|
||||
font: menu;
|
||||
list-style-image: none;
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menu[disabled="true"], menuitem[disabled="true"],
|
||||
menu[_moz-menuactive="true"][disabled="true"],
|
||||
menuitem[_moz-menuactive="true"][disabled="true"] {
|
||||
color: GrayText;
|
||||
background-color: transparent !important;
|
||||
/* background-image: none !important; */
|
||||
}
|
||||
|
||||
/* ..... internal content .... */
|
||||
|
||||
.menu-text,
|
||||
.menu-iconic-left,
|
||||
.menu-iconic-text {
|
||||
margin: 0px 4px 0px 0px !important;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.menu-text {
|
||||
margin-left: 20px !important;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.menu-accel,
|
||||
.menu-iconic-accel {
|
||||
margin: 0px 2px 0px 7px !important;
|
||||
padding-right: 14px;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.menu-iconic-left {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
/* ..... menu arrow box ..... */
|
||||
|
||||
.menu-right {
|
||||
margin: 0px 0px 0px 6px;
|
||||
width: 8px;
|
||||
list-style-image: url("chrome://global/skin/menu/menu-arrow.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
.menu-right[_moz-menuactive="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-arrow-hov.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
.menu-right[disabled="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-arrow-dis.gif") !important;
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
/* ..... internal content .... */
|
||||
|
||||
.menubar-left {
|
||||
margin: 0px 2px 0px 0px;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.menubar-text {
|
||||
margin: 0px 2px 0px 0px !important;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* ::::: menu/menuitems in popups ::::: */
|
||||
|
||||
menupopup > menu,
|
||||
popup > menu,
|
||||
menupopup > menuitem,
|
||||
popup > menuitem {
|
||||
padding: 1px 8px 1px 8px !important;
|
||||
max-width: 42em;
|
||||
}
|
||||
|
||||
menupopup > menu[_moz-menuactive="true"],
|
||||
menupopup > menuitem[_moz-menuactive="true"],
|
||||
popup > menu[_moz-menuactive="true"],
|
||||
popup > menuitem[_moz-menuactive="true"] {
|
||||
/* background: url("chrome://global/skin/icons/menuselected.png") #FFFFFF repeat !important; */
|
||||
background-color: #3063b0;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
/* ::::: menu/menuitems in menulist popups ::::: */
|
||||
|
||||
.menulist-menupopup > menuitem,
|
||||
menulist > menupopup > menuitem,
|
||||
.menulist-menupopup > menu,
|
||||
menulist > menupopup > menu {
|
||||
padding-right: 25px !important;
|
||||
max-width: none;
|
||||
font: inherit;
|
||||
color: -moz-FieldText;
|
||||
}
|
||||
|
||||
.menulist-menupopup > menuitem > .menu-iconic-left,
|
||||
menulist > menupopup > menuitem > .menu-iconic-left,
|
||||
.menulist-menupopup > menu > .menu-iconic-left,
|
||||
menulist > menupopup > menu > .menu-iconic-left {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
menulist > menupopup > menuitem[_moz-menuactive="true"] {
|
||||
/* border: 1px dotted #F5DB95; */
|
||||
}
|
||||
|
||||
/* ::::: checkbox menuitem ::::: */
|
||||
|
||||
menuitem[checked="true"],
|
||||
menulist > menupopup > menuitem[selected="true"],
|
||||
.menulist-menupopup > menuitem[selected="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-check.png");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menuitem[checked="true"][disabled="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-check-dis.png");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menuitem[checked="true"][_moz-menuactive="true"]:not([disabled="true"]),
|
||||
menulist > menupopup > menuitem[_moz-menuactive="true"][selected="true"]:not([disabled="true"]),
|
||||
.menulist-menupopup > menuitem[_moz-menuactive="true"][selected="true"]:not([disabled="true"]) {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-check-hov.png") !important;
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
/* ::::: radio menuitem ::::: */
|
||||
|
||||
/* ::::: menuseparator ::::: */
|
||||
|
||||
menuseparator {
|
||||
margin: 6px 1px 4px 1px;
|
||||
padding: 1px !important;
|
||||
border-top: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
/* ::::: menulist popup ::::: */
|
||||
menulist > menupopup {
|
||||
margin: 4px 0px 4px 0px;
|
||||
}
|
||||
|
||||
/* ::::: autocomplete ::::: */
|
||||
|
||||
.autocomplete-history-popup > menuitem {
|
||||
max-width: none !important;
|
||||
font: message-box;
|
||||
}
|
||||
|
||||
/* ::::: tree column picker ::::: */
|
||||
|
||||
.treecell-popupcell-menu {
|
||||
margin-left: -2px;
|
||||
list-style-image: url("chrome://global/skin/columnselect.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
|
@ -1,232 +0,0 @@
|
|||
/*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Joe Hewitt (hewitt@netscape.com)
|
||||
*
|
||||
*/
|
||||
|
||||
/* ===== menu.css =======================================================
|
||||
== Styles used by XUL menu-related elements.
|
||||
======================================================================= */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
/* ::::: menu/menuitem ::::: */
|
||||
|
||||
menu,
|
||||
menuitem {
|
||||
-moz-box-align: center;
|
||||
color: MenuText;
|
||||
font: menu;
|
||||
list-style-image: none;
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menuitem[default="true"] {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
menu[disabled="true"], menuitem[disabled="true"],
|
||||
menu[_moz-menuactive="true"][disabled="true"],
|
||||
menuitem[_moz-menuactive="true"][disabled="true"] {
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
/* ..... internal content .... */
|
||||
|
||||
.menu-text,
|
||||
.menu-iconic-left,
|
||||
.menu-iconic-text {
|
||||
margin: 0px 2px 0px 0px !important;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.menu-text {
|
||||
margin-left: 18px !important;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.menu-accel,
|
||||
.menu-iconic-accel {
|
||||
margin: 0px 2px 0px 7px !important;
|
||||
padding-right: 14px;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.menu-iconic-left {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
/* ..... menu arrow box ..... */
|
||||
|
||||
.menu-right {
|
||||
margin: 0px 0px 0px 6px;
|
||||
width: 8px;
|
||||
list-style-image: url("chrome://global/skin/menu/Menu-arrow.png");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
.menu-right[_moz-menuactive="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/Menu-arrow-hover.png");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
.menu-right[disabled="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/Menu-arrow-disabled.png") !important;
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
/* ::::: menu/menuitems in menubar ::::: */
|
||||
|
||||
menubar > menu {
|
||||
border: 1px solid transparent;
|
||||
padding: 2px 5px 2px 7px;
|
||||
margin: 1px 0px 1px 0px;
|
||||
}
|
||||
menubar > menu[_moz-menuactive="true"] {
|
||||
border-top: 1px solid ThreeDHighlight;
|
||||
border-right: 1px solid ThreeDShadow;
|
||||
border-bottom: 1px solid ThreeDShadow;
|
||||
border-left: 1px solid ThreeDHighlight;
|
||||
}
|
||||
menubar > menu[_moz-menuactive="true"][open="true"] {
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
border-right: 1px solid ThreeDHighlight;
|
||||
border-bottom: 1px solid ThreeDHighlight;
|
||||
border-left: 1px solid ThreeDShadow;
|
||||
}
|
||||
|
||||
/* ..... internal content .... */
|
||||
|
||||
.menubar-left {
|
||||
margin: 0px 2px 0px 0px;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.menubar-text {
|
||||
margin: 0px 2px 0px 0px !important;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* ::::: menu/menuitems in popups ::::: */
|
||||
|
||||
menupopup > menu,
|
||||
popup > menu,
|
||||
menupopup > menuitem,
|
||||
popup > menuitem {
|
||||
padding: 2px;
|
||||
max-width: 42em;
|
||||
}
|
||||
|
||||
menupopup > menu[_moz-menuactive="true"],
|
||||
menupopup > menuitem[_moz-menuactive="true"],
|
||||
popup > menu[_moz-menuactive="true"],
|
||||
popup > menuitem[_moz-menuactive="true"] {
|
||||
background-color: Highlight;
|
||||
color: HighlightText;
|
||||
}
|
||||
|
||||
/* ::::: menu/menuitems in menulist popups ::::: */
|
||||
|
||||
.menulist-menupopup > menuitem,
|
||||
menulist > menupopup > menuitem,
|
||||
.menulist-menupopup > menu,
|
||||
menulist > menupopup > menu {
|
||||
border: 1px solid transparent;
|
||||
padding: 1px 30px 1px 5px;
|
||||
max-width: none;
|
||||
font: message-box;
|
||||
color: -moz-FieldText;
|
||||
}
|
||||
|
||||
.menulist-menupopup > menuitem > .menu-iconic-left,
|
||||
menulist > menupopup > menuitem > .menu-iconic-left,
|
||||
.menulist-menupopup > menu > .menu-iconic-left,
|
||||
menulist > menupopup > menu > .menu-iconic-left {
|
||||
display: none;
|
||||
}
|
||||
|
||||
menulist > menupopup > menuitem[_moz-menuactive="true"] {
|
||||
border: 1px dotted #F5DB95;
|
||||
}
|
||||
|
||||
/* ::::: checkbox menuitem ::::: */
|
||||
|
||||
menuitem[checked="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-check.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menuitem[checked="true"][disabled="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-check-disabled.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menuitem[checked="true"][_moz-menuactive="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-check-hover.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
/* ::::: radio menuitem ::::: */
|
||||
|
||||
menuitem[checked="true"][type="radio"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-radio.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menuitem[checked="true"][type="radio"][disabled="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-radio-disabled.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
menuitem[checked="true"][type="radio"][_moz-menuactive="true"] {
|
||||
list-style-image: url("chrome://global/skin/menu/menu-radio-hover.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
/* ::::: menuseparator ::::: */
|
||||
|
||||
menuseparator {
|
||||
margin: 2px 3px;
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
border-bottom: 1px solid ThreeDHighlight;
|
||||
}
|
||||
|
||||
menulist > menupopup > menuseparator,
|
||||
.menulist-menupopup > menuseparator {
|
||||
margin: 2px 0;
|
||||
border-top: 1px solid #000000;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* ::::: autocomplete ::::: */
|
||||
|
||||
.autocomplete-history-popup > menuitem {
|
||||
max-width: none !important;
|
||||
font: message-box;
|
||||
}
|
||||
|
||||
/* ::::: tree column picker ::::: */
|
||||
|
||||
.treecell-popupcell-menu {
|
||||
margin-left: -2px;
|
||||
list-style-image: url("chrome://global/skin/columnselect.gif");
|
||||
-moz-image-region: auto;
|
||||
}
|
|
@ -1,157 +0,0 @@
|
|||
/*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Joe Hewitt (hewitt@netscape.com)
|
||||
*/
|
||||
|
||||
/* ===== menulist.css ===================================================
|
||||
== Styles used by the XUL menulist element.
|
||||
======================================================================= */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
/* :::::::::: menulist :::::::::: */
|
||||
|
||||
menulist {
|
||||
-moz-appearance: menulist;
|
||||
margin: 2px 4px;
|
||||
border: 2px solid;
|
||||
-moz-border-top-colors: ThreeDShadow ThreeDDarkShadow;
|
||||
-moz-border-right-colors: ThreeDHighlight ThreeDLightShadow;
|
||||
-moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow;
|
||||
-moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
|
||||
background-color: -moz-Field;
|
||||
color: -moz-FieldText;
|
||||
}
|
||||
|
||||
.menulist-label-box {
|
||||
-moz-box-align: center;
|
||||
-moz-box-pack: center;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.menulist-label-box,
|
||||
menulist[open="true"]:focus > .menulist-label-box {
|
||||
border: 1px solid transparent;
|
||||
background-color: transparent;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.menulist-label {
|
||||
margin: 1px 3px !important;
|
||||
}
|
||||
|
||||
/* ..... dropmarker ..... */
|
||||
|
||||
.menulist-dropmarker {
|
||||
-moz-appearance: menulist-button;
|
||||
min-width: 17px;
|
||||
-moz-box-align: center;
|
||||
-moz-box-pack: center;
|
||||
border: 2px solid;
|
||||
background-color: -moz-Dialog;
|
||||
list-style-image: url("chrome://global/skin/arrow/arrow-dn.gif");
|
||||
}
|
||||
|
||||
.menulist-dropmarker,
|
||||
menulist[disabled="true"]:hover:active > .menulist-dropmarker {
|
||||
-moz-border-top-colors: ThreeDLightShadow ThreeDHighlight;
|
||||
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-left-colors: ThreeDLightShadow ThreeDHighlight;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
menulist[disabled="true"] > .menulist-dropmarker {
|
||||
list-style-image: url("chrome://global/skin/arrow/arrow-dn-dis.gif");
|
||||
}
|
||||
|
||||
menulist:hover:active > .menulist-dropmarker {
|
||||
-moz-border-top-colors: ThreeDShadow ThreeDFace;
|
||||
-moz-border-right-colors: ThreeDShadow ThreeDFace;
|
||||
-moz-border-bottom-colors: ThreeDShadow ThreeDFace;
|
||||
-moz-border-left-colors: ThreeDShadow ThreeDFace;
|
||||
padding: 2px 0px 0px 2px;
|
||||
}
|
||||
|
||||
/* ..... focused state ..... */
|
||||
|
||||
menulist:focus > .menulist-label-box {
|
||||
border: 1px dotted #F5DB95;
|
||||
background-color: Highlight;
|
||||
color: HighlightText;
|
||||
}
|
||||
|
||||
/* ..... disabled state ..... */
|
||||
|
||||
menulist[disabled="true"] {
|
||||
background-color: -moz-Dialog;
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
/* ::::: editable menulists ::::: */
|
||||
|
||||
.menulist-editable-box {
|
||||
padding: 3px 0px 3px 2px;
|
||||
}
|
||||
|
||||
html|*.menulist-editable-input {
|
||||
margin: 0px !important;
|
||||
border: none !important;
|
||||
padding: 0px !important;
|
||||
background: inherit;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
/* ::::: compact menulists ::::: */
|
||||
|
||||
.menulist-compact {
|
||||
-moz-box-align: center;
|
||||
-moz-box-pack: center;
|
||||
margin: 0;
|
||||
-moz-border-top-colors: ThreeDLightShadow ThreeDHighlight;
|
||||
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-left-colors: ThreeDLightShadow ThreeDHighlight;
|
||||
background-color: -moz-Dialog;
|
||||
color: -moz-DialogText;
|
||||
}
|
||||
|
||||
.menulist-compact > .menulist-label {
|
||||
margin: 0 3px !important;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.menulist-compact > .menulist-dropmarker {
|
||||
margin-left: 2px;
|
||||
border: none;
|
||||
padding: 0 !important;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.menulist-compact[open="true"] {
|
||||
-moz-border-top-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-left-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
background-color: ThreeDShadow;
|
||||
color: ThreeDHighlight;
|
||||
}
|
|
@ -98,6 +98,17 @@
|
|||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="menuitem-iconic-desc-noaccel" extends="chrome://global/content/bindings/menu.xml#menuitem">
|
||||
<content>
|
||||
<xul:hbox class="menu-iconic-left" align="center" pack="center"
|
||||
xbl:inherits="selected,disabled,checked">
|
||||
<xul:image class="menu-iconic-icon" xbl:inherits="src=image,validate,src"/>
|
||||
</xul:hbox>
|
||||
<xul:label class="menu-iconic-text" xbl:inherits="value=label,accesskey,crop" crop="right" flex="1"/>
|
||||
<xul:label class="menu-iconic-text menu-description" xbl:inherits="value=description" crop="right" flex="10000"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="menu-iconic" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
|
||||
<content>
|
||||
<xul:hbox class="menu-iconic-left" align="center" pack="center">
|
||||
|
|
|
@ -85,6 +85,8 @@
|
|||
onget="return this.getAttribute('src');"/>
|
||||
<property name="label" onset="this.setAttribute('label',val); return val;"
|
||||
onget="return this.getAttribute('label');"/>
|
||||
<property name="description" onset="this.setAttribute('description',val); return val;"
|
||||
onget="return this.getAttribute('description');"/>
|
||||
<property name="disabled" onset="if (val) this.setAttribute('disabled',true);
|
||||
else this.removeAttribute('disabled');
|
||||
return val;"
|
||||
|
@ -162,6 +164,7 @@
|
|||
this.removeAttribute('value');
|
||||
this.removeAttribute('src');
|
||||
this.removeAttribute('label');
|
||||
this.removeAttribute('description');
|
||||
return val;
|
||||
}
|
||||
|
||||
|
@ -170,6 +173,7 @@
|
|||
this.setAttribute('value', val.getAttribute('value'));
|
||||
this.setAttribute('src', val.getAttribute('src'));
|
||||
this.setAttribute('label', val.getAttribute('label'));
|
||||
this.setAttribute('description', val.getAttribute('description'));
|
||||
|
||||
return val;
|
||||
]]>
|
||||
|
@ -179,6 +183,7 @@
|
|||
<method name="appendItem">
|
||||
<parameter name="label"/>
|
||||
<parameter name="value"/>
|
||||
<parameter name="description"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
@ -187,6 +192,8 @@
|
|||
var item = document.createElementNS(XULNS, "menuitem");
|
||||
item.setAttribute("label", label);
|
||||
item.setAttribute("value", value);
|
||||
item.setAttribute("description", description);
|
||||
|
||||
popup.appendChild(item);
|
||||
return item;
|
||||
]]>
|
||||
|
@ -197,6 +204,7 @@
|
|||
<parameter name="index"/>
|
||||
<parameter name="label"/>
|
||||
<parameter name="value"/>
|
||||
<parameter name="description"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
@ -205,6 +213,8 @@
|
|||
var item = document.createElementNS(XULNS, "menuitem");
|
||||
item.setAttribute("label", label);
|
||||
item.setAttribute("value", value);
|
||||
item.setAttribute("description", description);
|
||||
|
||||
if (index < popup.childNodes.length)
|
||||
popup.insertBefore(item, popup.childNodes[index]);
|
||||
else
|
||||
|
@ -436,5 +446,17 @@
|
|||
<children includes="menupopup"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
|
||||
<binding id="menulist-description" display="xul:menu"
|
||||
extends="chrome://global/content/bindings/menulist.xml#menulist">
|
||||
<content sizetopopup="pref">
|
||||
<xul:hbox class="menulist-label-box" flex="1">
|
||||
<xul:image class="menulist-icon" xbl:inherits="src"/>
|
||||
<xul:label class="menulist-label" xbl:inherits="value=label,crop,accesskey" crop="right" flex="1"/>
|
||||
<xul:label class="menulist-label menulist-description" xbl:inherits="value=description" crop="right" flex="10000"/>
|
||||
</xul:hbox>
|
||||
<xul:dropmarker class="menulist-dropmarker" type="menu"/>
|
||||
<children includes="menupopup"/>
|
||||
</content>
|
||||
</binding>
|
||||
</bindings>
|
||||
|
|
|
@ -259,6 +259,10 @@ menuitem.menuitem-iconic {
|
|||
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic");
|
||||
}
|
||||
|
||||
menuitem[description] {
|
||||
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic-desc-noaccel");
|
||||
}
|
||||
|
||||
menuitem[type="checkbox"],
|
||||
menuitem[type="radio"] {
|
||||
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic");
|
||||
|
@ -682,6 +686,10 @@ menulist[editable] {
|
|||
-moz-binding: url("chrome://global/content/bindings/menulist.xml#menulist-editable");
|
||||
}
|
||||
|
||||
menulist[type="description"] {
|
||||
-moz-binding: url("chrome://global/content/bindings/menulist.xml#menulist-description");
|
||||
}
|
||||
|
||||
html|*.menulist-editable-input {
|
||||
-moz-appearance: none !important;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче