The default color for NSProgressIndicator is gray but I want it to be white.

Is there anyone who knows how to do it ? Please let me know.

Many thanks.

没有正确的解决方案

其他提示

Create subclass of NSProgressIndicator inside method do like this

- (void)drawRect:(NSRect)dirtyRect
{
    // Drawing code here.
        [self setControlTint:NSGraphiteControlTint];
    CGContextSetBlendMode((CGContextRef)[[NSGraphicsContext currentContext] graphicsPort], kCGBlendModeSoftLight);
    [[[NSColor whiteColor] colorWithAlphaComponent:1] set];
    [NSBezierPath fillRect:dirtyRect];
    [super drawRect:dirtyRect];
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top