diff --git a/redo/reredo/darwin/box.m b/redo/reredo/darwin/box.m index 757f53cc..a153076b 100644 --- a/redo/reredo/darwin/box.m +++ b/redo/reredo/darwin/box.m @@ -5,6 +5,7 @@ // - page 2 isn't growable - I think this is because the button in the tab isn't stretchy // - tab on page 2 is glitched // - 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 { uiDarwinControl c; diff --git a/redo/reredo/darwin/progressbar.m b/redo/reredo/darwin/progressbar.m index 5aa9be83..864d2cc3 100644 --- a/redo/reredo/darwin/progressbar.m +++ b/redo/reredo/darwin/progressbar.m @@ -1,9 +1,6 @@ // 14 august 2015 #import "uipriv_darwin.h" -// TODOs: -// - 10.8: increasing value animates just like with Aero - struct uiProgressBar { uiDarwinControl c; NSProgressIndicator *pi; @@ -19,6 +16,15 @@ void uiProgressBarSetValue(uiProgressBar *p, int value) { if (value < 0 || value > 100) 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)]; }