Question

I'm using https://github.com/kelan/yrk-spinning-progress-indicator to get a white colored spinner. Note that this is not a subclass of NSProgressIndicator, but instead a custom NSView.

The problem is that the corners of this custom view are showing as white, instead of just a clear background. You can see this in this image:

Screenshot.

This is the code I have :

[_statusProgressIndicator setColor:[NSColor whiteColor]];
[_statusProgressIndicator setIndeterminate:YES];
[_statusProgressIndicator setBackgroundColor:[NSColor clearColor]];
[_statusProgressIndicator setDrawsBackground:YES];
[_statusProgressIndicator startAnimation:self];

I also tried:

[_statusProgressIndicator setDrawsBackground:NO];

But it has the same effect.

Any ideas on how to fix this?

Was it helpful?

Solution

I downloaded the code and ran the sample, and there are no rounded corners present in the spinner provided by the original code.

I notice in your image that your view containing the spinner also has rounded corners? Are you using layer-backed views with the setCornerRadius: method?

If so, it looks like the spinner sub-view also has that property set, as it does looks like the spinner and your containing view have the same size rounded corners.

Try specifically setting the corner radius of the spinner view to 0?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top