• 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
Re: Safari's EtchedStringView class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari's EtchedStringView class


  • Subject: Re: Safari's EtchedStringView class
  • From: Andrew Garber <email@hidden>
  • Date: Sat, 24 May 2003 18:28:19 -0700

Thanks Clark! I took your advice and decided to experiment by overlapping two NSTextFields, offset by one pixel, in InterfaceBuilder. Here's the colour scheme that seems to most closely match Apple's (for anyone who's interested):

All text is Lucida Grande 11, Bold.


Regular "etched text" (for metal look):

100% Opaque Grey Text (25% brightness) (RGB 0x404040)
50% Opaque White Text, with transparent background (shifted down by 1 pixel)


Highlighted "etched text" (for metal look):

100% Opaque White Text
50% Opaque Black Text, with 35% Opaque Black Background (shifted down by 1 pixel)



On Saturday, May 24, 2003, at 07:05 AM, Clark Cox wrote:


On Saturday, May 24, 2003, at 08:08 US/Eastern, Andrew Garber wrote:

To the Apple Developers...
Is there any chance I could get my hands on Safari's EtchedStringView class? Or maybe some hints on how to implement it? I'm writing an app that uses a "metal" interface (it has a textured window), and I want to make any text displayed on the metal surface to have exactly the same "etched" look that text has in Safari's favourites bar. Think you could help me (and other developers working on achieving the standard "metal" look) out?

While I agree that it would be nice to have some "official" Apple code to do this, it doesn't look like it would be too hard to imitate. From looking at it in Pixie, it looks like all that's being done is that first the text is drawn in a light grey color, and then it is drawn in black, offset vertically by 1 pixel. Then, when it's highlighted, just invert the text, and draw the background in a darker grey (Pixie tells me that it's 0.4314)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Safari's EtchedStringView class (From: Clark Cox <email@hidden>)

  • Prev by Date: Re: Recommendations for scripting/extension languages for Cocoa apps
  • Next by Date: NSProgressIndicator in NSTableView
  • Previous by thread: Re: Safari's EtchedStringView class
  • Next by thread: Localization and bugs in the Finder
  • Index(es):
    • Date
    • Thread