Pregunta

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.

No hay solución correcta

Otros consejos

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];
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top