зеркало из https://github.com/mozilla/pjs.git
bug 213228: new toolkit independence bug, part 7: update and use the new toolkit widgetry.
popup.xml: bug 38367 by neil
This commit is contained in:
Родитель
2fd45f3649
Коммит
178ee724bb
|
@ -11,7 +11,7 @@
|
|||
</resources>
|
||||
</binding>
|
||||
|
||||
<binding id="popup" extends="chrome://global/content/bindings/popup.xml#popup-base">
|
||||
<binding id="popup" extends="chrome://global/content/widgets/popup.xml#popup-base">
|
||||
<content>
|
||||
<xul:arrowscrollbox class="popup-internal-box" flex="1" orient="vertical">
|
||||
<children/>
|
||||
|
@ -138,10 +138,29 @@
|
|||
|
||||
<handlers>
|
||||
<handler event="contextmenu" action="event.preventDefault();"/>
|
||||
|
||||
<handler event="popupshowing" phase="target">
|
||||
<![CDATA[
|
||||
var array = [];
|
||||
var width = 0;
|
||||
for (var menuitem = this.firstChild; menuitem; menuitem = menuitem.nextSibling) {
|
||||
if (menuitem.localName == "menuitem" && menuitem.hasAttribute("acceltext")) {
|
||||
var accel = document.getAnonymousElementByAttribute(menuitem, "anonid", "accel");
|
||||
if (accel && accel.boxObject) {
|
||||
array.push(accel);
|
||||
if (accel.boxObject.width > width)
|
||||
width = accel.boxObject.width;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < array.length; i++)
|
||||
array[i].width = width;
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
<binding id="tooltip" extends="chrome://global/content/bindings/popup.xml#popup">
|
||||
<binding id="tooltip" extends="chrome://global/content/widgets/popup.xml#popup">
|
||||
<content>
|
||||
<children>
|
||||
<xul:label class="tooltip-label" xbl:inherits="value=label,crop" crop="right" flex="1"/>
|
||||
|
@ -304,7 +323,7 @@
|
|||
</binding>
|
||||
|
||||
<!-- East-West resizer -->
|
||||
<binding id="ew-resizer" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
|
||||
<binding id="ew-resizer" extends="xul:box"> <!-- extends="chrome://global/content/widgets/popup.xml#resizerbase"> -->
|
||||
<content>
|
||||
<xul:hbox class="ew-resizer-box" flex="1"/>
|
||||
</content>
|
||||
|
@ -337,7 +356,7 @@
|
|||
</binding>
|
||||
|
||||
<!-- North-South resizer -->
|
||||
<binding id="ns-resizer" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
|
||||
<binding id="ns-resizer" extends="xul:box"> <!-- extends="chrome://global/content/widgets/popup.xml#resizerbase"> -->
|
||||
<content>
|
||||
<xul:hbox class="ns-resizer-box" flex="1"/>
|
||||
</content>
|
||||
|
@ -371,7 +390,7 @@
|
|||
</binding>
|
||||
|
||||
<!-- Diagonal resizer -->
|
||||
<binding id="diag-resizer" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
|
||||
<binding id="diag-resizer" extends="xul:box"> <!-- extends="chrome://global/content/widgets/popup.xml#resizerbase"> -->
|
||||
<content>
|
||||
<xul:hbox class="diag-resizer-box" align="center" flex="1">
|
||||
<xul:image class="diag-resizer-image"/>
|
||||
|
@ -411,7 +430,7 @@
|
|||
-->
|
||||
</binding>
|
||||
|
||||
<binding id="titlebar" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
|
||||
<binding id="titlebar" extends="xul:box"> <!-- extends="chrome://global/content/widgets/popup.xml#resizerbase"> -->
|
||||
<content>
|
||||
<xul:hbox class="titlebar-box" flex="1">
|
||||
<xul:hbox class="titlebar-title-box" flex="1" tooltiptext="Click and drag to float">
|
||||
|
@ -455,7 +474,7 @@
|
|||
-->
|
||||
</binding>
|
||||
|
||||
<binding id="floater-base" display="xul:popup" extends="chrome://global/content/bindings/popup.xml#popup">
|
||||
<binding id="floater-base" display="xul:popup" extends="chrome://global/content/widgets/popup.xml#popup">
|
||||
<implementation>
|
||||
|
||||
<!-- Popup Manipulation Constants -->
|
||||
|
@ -596,7 +615,7 @@
|
|||
</handlers>
|
||||
</binding>
|
||||
|
||||
<binding id="popup-scrollbars" extends="chrome://global/content/bindings/popup.xml#popup">
|
||||
<binding id="popup-scrollbars" extends="chrome://global/content/widgets/popup.xml#popup">
|
||||
<content>
|
||||
<xul:hbox class="popup-internal-box" flex="1" orient="vertical" style="overflow: auto;">
|
||||
<children/>
|
||||
|
@ -604,7 +623,7 @@
|
|||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="floater-normal" extends="chrome://global/content/bindings/popup.xml#floater-base">
|
||||
<binding id="floater-normal" extends="chrome://global/content/widgets/popup.xml#floater-base">
|
||||
<content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
|
||||
<vbox class="floater-box" flex="1">
|
||||
<box class="floater-box-top">
|
||||
|
@ -623,7 +642,7 @@
|
|||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="floater-dock-left" extends="chrome://global/content/bindings/popup.xml#floater-base">
|
||||
<binding id="floater-dock-left" extends="chrome://global/content/widgets/popup.xml#floater-base">
|
||||
<content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
|
||||
<vbox class="floater-box" flex="1">
|
||||
<box class="floater-box-top">
|
||||
|
@ -639,7 +658,7 @@
|
|||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="close-button" extends="chrome://global/content/bindings/button.xml#button-base">
|
||||
<binding id="close-button" extends="chrome://global/content/widgets/button.xml#button-base">
|
||||
<content>
|
||||
<xul:hbox align="center" flex="1">
|
||||
<xul:image class="close-button-x"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче