diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index ebc08fb411c..360fe73b648 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -869,28 +869,26 @@ GHOST_TSuccess GHOST_WindowCocoa::setProgressBar(float progress) NSImage *dockIcon = [[NSImage alloc] initWithSize:NSMakeSize(128, 128)]; [dockIcon lockFocus]; - NSRect progressBox = {{4, 4}, {120, 16}}; [[NSImage imageNamed:@"NSApplicationIcon"] drawAtPoint:NSZeroPoint fromRect:NSZeroRect operation:NSCompositingOperationSourceOver fraction:1.0]; - // Track & Outline - [[NSColor blackColor] setFill]; - NSRectFill(progressBox); + NSRect progressRect = {{8, 8}, {112, 14}}; + NSBezierPath *progressPath; - [[NSColor whiteColor] set]; - NSFrameRect(progressBox); + /* Draw white track. */ + [[[NSColor whiteColor] colorWithAlphaComponent: 0.6] setFill]; + progressPath = [NSBezierPath bezierPathWithRoundedRect:progressRect xRadius:7 yRadius:7]; + [progressPath fill]; - // Progress fill - progressBox = NSInsetRect(progressBox, 1, 1); - - progressBox.size.width = progressBox.size.width * progress; - NSGradient *gradient = [[NSGradient alloc] initWithStartingColor:[NSColor darkGrayColor] - endingColor:[NSColor lightGrayColor]]; - [gradient drawInRect:progressBox angle:90]; - [gradient release]; + /* Black progress fill. */ + [[[NSColor blackColor] colorWithAlphaComponent: 0.7] setFill]; + progressRect = NSInsetRect(progressRect, 2, 2); + progressRect.size.width *= progress; + progressPath = [NSBezierPath bezierPathWithRoundedRect:progressRect xRadius:5 yRadius:5]; + [progressPath fill]; [dockIcon unlockFocus];