• 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: Smart way to get "etched" borders in Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Smart way to get "etched" borders in Leopard


  • Subject: Re: Smart way to get "etched" borders in Leopard
  • From: "Ken Ferry" <email@hidden>
  • Date: Fri, 9 Nov 2007 17:10:36 -0800

I'm trying to get that look in my main window too - and unfortunately
> nothing I've tried seems to work.
>
> The window is a textured window

Yes, you won't see the separator in textured windows.  The bottom
gradient goes in a different direction, and the separator isn't
appropriate.  Here's the relevant paragraph from the release notes:

"The behavior of -setContentBorderThickness:forEdge:NSMinYEdge and
-setAutorecalculatesContentBorderThickness:NO forEdge:NSMinYEdge for
non-textured windows will do the following: The top gradient will be
repeated in the bottom border, separator lines will be drawn between
the content and the bottom border, and the bottom corner will be
rounded. Other methods on non-textured windows or unused edges will
return 0.0 or YES."

-Ken
Cocoa Frameworks

On Nov 9, 2007 1:42 PM, Andrew Kimpton <email@hidden> wrote:
>
>
>
> On Nov 8, 2007, at 5:00 PM, Ken Ferry wrote:
> Hi Jesse,
>
> You can see that right
> below the scroll view there are two lines that form a etching of some
> sort. From top to bottom, a dark (black?) line followed by a lighter
> line.
>
>         http://hogbaysoftware.com/files/leapardscreen.png
>
> Yes, there is something new here.  Take a look at -[NSWindow
> contentBorderThicknessForEdge:] and friends.
>
> http://developer.apple.com/releasenotes/Cocoa/AppKit.html#NSWindow
>
>
> I'm trying to get that look in my main window too - and unfortunately
> nothing I've tried seems to work.
>
> The window is a textured window it has a large view under the content view
> which in turn contains some smaller views, a sibling to this view is a
> button, a progress bar and a text field. I have approx 20-30 pixels of space
> above and below the large view (which contains the other sibling views).
>
> The large view has no 'etching' around it at all. Adding :
>
>
>   [[self window] setAutorecalculatesContentBorderThickness:NO
> forEdge:NSMinYEdge | NSMaxYEdge];
>   [[self window] setContentBorderThickness:10.0 forEdge:NSMinYEdge |
> NSMaxYEdge]; // Try 10.0 just to get an effect
>
> To my windowcontrollers awakeFromNib doesn't make any difference either.
>
> I don't see what else is needed from my reading of the Release notes.
>
> Any other pointers ?
>
>
> -Ken
> Cocoa Frameworks
>
> Andrew 8-)
>
> P.S. You can see a screenshot of the incorrect look at
> http://awkward.org/downloads/window_no_etching.png
>
>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: Smart way to get "etched" borders in Leopard
      • From: Andrew Kimpton <email@hidden>
References: 
 >Smart way to get "etched" borders in Leopard (From: email@hidden)
 >Re: Smart way to get "etched" borders in Leopard (From: Chris Hanson <email@hidden>)
 >Re: Smart way to get "etched" borders in Leopard (From: Jesse Grosjean <email@hidden>)
 >Re: Smart way to get "etched" borders in Leopard (From: "Ken Ferry" <email@hidden>)
 >Re: Smart way to get "etched" borders in Leopard (From: Andrew Kimpton <email@hidden>)

  • Prev by Date: Re: NSView / Drag and Drop: Any API or constants to detect the start of a drag?
  • Next by Date: Re: SenTestingKit fails when using CG-Only
  • Previous by thread: Re: Smart way to get "etched" borders in Leopard
  • Next by thread: Re: Smart way to get "etched" borders in Leopard
  • Index(es):
    • Date
    • Thread