• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Changing the Color of NSProgressIndicator with CGContextSetBlendMode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changing the Color of NSProgressIndicator with CGContextSetBlendMode


  • Subject: Changing the Color of NSProgressIndicator with CGContextSetBlendMode
  • From: Robert Kukuchka <email@hidden>
  • Date: Tue, 20 Feb 2007 16:15:17 -0800

Hello,
I'm testing out an idea to change the color of NSProgressIndicator from it's default state, and I'm getting some weird issues. Any help would be greatly appreciated.


Here is a simplified version of what I'm doing
1) adding an NSProgressIndicator to my window
2) setControlTint:NSGraphiteControlTint
2) adding a view on top (using addSubview:positioned:relativeTo:)
3) Within the drawRect of my view I do the following:
CGContextSetBlendMode((CGContextRef)[[NSGraphicsContext currentContext] graphicsPort], kCGBlendModeColor);
[[[NSColor magentaColor] colorWithAlphaComponent:1] set];
[NSBezierPath fillRect:rect];


Results:
I'm getting some "flickering" during progress advancement. I make sure to call [myView setNeedsDisplay:YES]; anytime I manipulate the progressBar (such as incrementBy:), but it still occasionally seems that the NSProgressIndicator is not respecting the Z-Ordering, and I only see the progress as the Graphite.


Oddly enough if I setIndeterminate to YES, it blends perfectly, only using a determinate option results in the flickering.

Any ideas?

Cheers
Rob

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Changing the Color of NSProgressIndicator with CGContextSetBlendMode
      • From: Andrew Merenbach <email@hidden>
  • Prev by Date: orderBack: only works when frontmost?
  • Next by Date: Re: Changing the Color of NSProgressIndicator with CGContextSetBlendMode
  • Previous by thread: Re: orderBack: only works when frontmost?
  • Next by thread: Re: Changing the Color of NSProgressIndicator with CGContextSetBlendMode
  • Index(es):
    • Date
    • Thread