The "value" property of progress meter is a percentage, so it can't advance by less than 1/100 of its length. I guess yours is wider than 100 pixels.
Igor Tandetnik
You can change the maximum by using max="1000" for example.
Are you sure? I'm looking at the XBL binding, and I see 100 hardcoded everywhere, and nary a "max" in sight:
http://mxr.mozilla.org/mozilla/source/toolkit/content/widgets/progressmeter.xml
Igor Tandetnik
That seems to be the answer. Somehow I expected the progressmeter to
accept floats. Obviously I was wrong. :)
Thanks Igor!
I must be doing something wrong. The progressmeter is 130px long and
the steps are like 3-4px.
I will try to isolate that to find out where did I messed it.
>Jaroslav Z�ruba <jarosla...@gmail.com> wrote:
>
>
>>Am I doing something wrong or are there some steps defined on progressmeter which prevent it from progressing pixel by pixel?
>>
>>
>The "value" property of progress meter is a percentage, so it can't advance by less than 1/100 of its length.
>
Worse, the progressmeter is "rate-limited" so you can only progress by
at least 4 since the last progress.
--
Warning: May contain traces of nuts.
If you look at the binding, there's this code:
var delta = p - c;
if (delta < 0)
delta = -delta;
if (delta > 3 || p == 0 || p == 100) {
this.setAttribute("value", p);
...
}
so it only actually progresses by three ticks at a time. You can probably fool it by going 4 ticks backward then 5 ticks forward, or something along these lines.
Igor Tandetnik
uh.. ugly.
or since seems a "simple" feature, implement it yourself. It has to
be easy to.. I don't know, move a red box inside a white box, or
something.
maybe, even ripping some code from the xbl itself.. (but removing
everything you don't understand)
<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>
--
--
ℱin del ℳensaje.