Domanda

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.

Nessuna soluzione corretta

Altri suggerimenti

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];
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top