Bug 226491 <progressmeter mode="undetermined"> for Classic skin r=mscott sr=jag

This commit is contained in:
neil%parkwaycc.co.uk 2004-08-07 12:26:59 +00:00
parent c94e0db87f
commit 2084b78b1e
4 changed files with 41 additions and 9 deletions

View File

@ -65,6 +65,10 @@ menulist > menupopup,
-moz-binding: url("chrome://global/content/bindings/menulist.xml#menulist-compact");
}
progressmeter[mode="undetermined"] {
-moz-binding: url("chrome://global/content/bindings/progressmeter.xml#progressmeter-undetermined");
}
/* ::::: root elements ::::: */
window,

View File

@ -61,6 +61,10 @@ menulist > menupopup,
-moz-binding: url("chrome://global/content/bindings/menulist.xml#menulist-compact");
}
progressmeter[mode="undetermined"] {
-moz-binding: url("chrome://global/content/bindings/progressmeter.xml#progressmeter-undetermined");
}
/* ::::: root elements ::::: */
window,

View File

@ -56,10 +56,6 @@ progressmeter {
min-height: 15px;
}
progressmeter[mode="undetermined"] {
background: url("chrome://global/skin/progressmeter/progressmeter-busy.gif") repeat-x 0% 50%;
}
.progress-bar
{
-moz-appearance: progresschunk;
@ -67,11 +63,6 @@ progressmeter[mode="undetermined"] {
background-color: ThreeDShadow;
}
.progress-bar[mode="undetermined"],
.progress-remainder[mode="undetermined"] {
visibility: collapse;
}
/* ::::: statusbar progressmeter ::::: */
.progressmeter-statusbar {

View File

@ -49,4 +49,37 @@
</implementation>
</binding>
<binding id="progressmeter-undetermined"
extends="chrome://global/content/bindings/progressmeter.xml#progressmeter">
<content>
<xul:stack class="progress-remainder" flex="1" anonid="stack" style="overflow: -moz-hidden-unscrollable;">
<xul:spacer class="progress-bar" anonid="spacer" top="0" style="margin-right: -1000px;"/>
</xul:stack>
</content>
<implementation>
<method name="init">
<body><![CDATA[
var stack = document.getAnonymousElementByAttribute(this, "anonid", "stack");
var spacer = document.getAnonymousElementByAttribute(this, "anonid", "spacer");
var position = -1;
var interval = setInterval(function nextStep() {
try {
spacer.height = stack.boxObject.height;
spacer.width = stack.boxObject.width >> 2;
spacer.left = spacer.width * position;
position += 30 / (stack.boxObject.width + 600);
if (position >= 4)
position = -1;
} catch (e) {
clearInterval(interval);
}
}, 10);
]]></body>
</method>
<constructor>this.init();</constructor>
</implementation>
</binding>
</bindings>