Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hilite ring around icon



On Jul 26, 2004, at 8:03 AM, Peter S Lau wrote:

1. IconRefToRegion() does not do a good job to describe the shape properly... so the hilite ring looks jaggy. And it also included the shadow area, so it does not even look right. I guess I should be looking at Quartz for this? Any pointer would be great.

The focus is isn't really drawn this way. I'm not sure your results will ever be satisfactory.

Focusing an Icon control draws the focus, though somewhat clipped. I would suggest trying one of these controls, oversized a bit to avoid clipping the focus. I'm not 100% that the enlargement will eliminate the clipping, but it's worth checking into.

2. I use kThemeBrushFocusHighlight in GetThemeBrushAsColor() but the color come back is the "Highlight Color" in the Appearance Prefs pane, not the "Appearance" color (either Blue or Graphite on my system), how do I get that color?

They shouldn't be the same.

RGBColor focusHiliteColor, primaryHiliteColor;
Boolean theSame;

verify_noerr( GetThemeBrushAsColor( kThemeBrushFocusHighlight, 32, true, &focusHiliteColor ) );
verify_noerr( GetThemeBrushAsColor( kThemeBrushPrimaryHighlightColor, 32, true, &primaryHiliteColor ) );
fprintf( stderr, "FocusHightlight %6d %6d %6d\n", focusHiliteColor.red, focusHiliteColor.green, focusHiliteColor.blue );
fprintf( stderr, "PrimaryHightlight %6d %6d %6d\n", primaryHiliteColor.red, primaryHiliteColor.green, primaryHiliteColor.blue );
theSame = ( focusHiliteColor.red == primaryHiliteColor.red && focusHiliteColor.green == primaryHiliteColor.green && focusHiliteColor.blue == primaryHiliteColor.blue );
fprintf( stderr, "Focus colors ARE%s the same.", theSame ? "" : "N'T" );

I ran the above with this output:

FocusHightlight 32256 44288 55552
PrimaryHightlight 61679 55287 0
Focus colors AREN'T the same.
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.


References: 
 >hilite ring around icon (From: Peter S Lau <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.