Fixed progressbar animation issue. Re-added TODO for clipping because I can't tell how it happens anymore.
This commit is contained in:
parent
bc8d6a2fe7
commit
1ba27d325e
|
@ -5,6 +5,7 @@
|
||||||
// - page 2 isn't growable - I think this is because the button in the tab isn't stretchy
|
// - page 2 isn't growable - I think this is because the button in the tab isn't stretchy
|
||||||
// - tab on page 2 is glitched
|
// - tab on page 2 is glitched
|
||||||
// - separators on page 4 have variable padding after them
|
// - separators on page 4 have variable padding after them
|
||||||
|
// - 10.8: if we switch to page 4, then switch back to page 1, check Spaced, and go back to page 4, some controls (progress bar, popup button) are clipped on the sides
|
||||||
|
|
||||||
struct uiBox {
|
struct uiBox {
|
||||||
uiDarwinControl c;
|
uiDarwinControl c;
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
// 14 august 2015
|
// 14 august 2015
|
||||||
#import "uipriv_darwin.h"
|
#import "uipriv_darwin.h"
|
||||||
|
|
||||||
// TODOs:
|
|
||||||
// - 10.8: increasing value animates just like with Aero
|
|
||||||
|
|
||||||
struct uiProgressBar {
|
struct uiProgressBar {
|
||||||
uiDarwinControl c;
|
uiDarwinControl c;
|
||||||
NSProgressIndicator *pi;
|
NSProgressIndicator *pi;
|
||||||
|
@ -19,6 +16,15 @@ void uiProgressBarSetValue(uiProgressBar *p, int value)
|
||||||
{
|
{
|
||||||
if (value < 0 || value > 100)
|
if (value < 0 || value > 100)
|
||||||
complain("value %d out of range in progressbarSetValue()", value);
|
complain("value %d out of range in progressbarSetValue()", value);
|
||||||
|
// on 10.8 there's an animation when the progress bar increases, just like with Aero
|
||||||
|
if (value == 100) {
|
||||||
|
[p->pi setMaxValue:101];
|
||||||
|
[p->pi setDoubleValue:101];
|
||||||
|
[p->pi setDoubleValue:100];
|
||||||
|
[p->pi setMaxValue:100];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
[p->pi setDoubleValue:((double) (value + 1))];
|
||||||
[p->pi setDoubleValue:((double) value)];
|
[p->pi setDoubleValue:((double) value)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue