Getting the "iCal" window style?

  • In Leopard, if you make a window that is textured, then the window's
    content is drawn with a gradient, and the bottom corners are rounded
    off. However, I noticed that several Apple applications (Address Book,
    iCal, Console, probably a few others) are using a look that is
    similar, except that the textured gradient at the bottom of the window
    is considerably lighter than the regular textured look.

    How did they do that? More importantly, how can we do that? It's not
    the unified style; I already tried that & I think it only does
    anything under Tiger.

    Nick Zitzmann
    <http://www.chronosnet.com/>
  • On Mon, Mar 3, 2008 at 10:08 PM, Nick Zitzmann <nick...> wrote:
    > How did they do that? More importantly, how can we do that? It's not
    > the unified style; I already tried that & I think it only does
    > anything under Tiger.

    Look into -[NSWindow setContentBorderThickness:forEdge:], and read the
    AppKit release notes for Leopard.

    --Kyle Sluder
  • On Mar 3, 2008, at 9:00 PM, Kyle Sluder wrote:

    > Look into -[NSWindow setContentBorderThickness:forEdge:], and read the
    > AppKit release notes for Leopard.

    I don't care about the etched borders; I only want the lighter
    gradient. How do I get the lighter gradient?

    Nick Zitzmann
    <http://www.chronosnet.com/>
  • I haven't tested this, but I'm almost certain that the thickness of
    the bottom border is exactly what causes the gradient to become
    lighter. Perhaps you should follow up on Kyle's advice and try it.
    Then perhaps you should read this:
    http://www.mikeash.com/getting_answers.html

    On Mon, Mar 3, 2008 at 10:21 PM, Nick Zitzmann <nick...> wrote:
    >
    > On Mar 3, 2008, at 9:00 PM, Kyle Sluder wrote:
    >
    >> Look into -[NSWindow setContentBorderThickness:forEdge:], and read the
    >> AppKit release notes for Leopard.
    >
    >
    > I don't care about the etched borders; I only want the lighter
    > gradient. How do I get the lighter gradient?
    >
    >
    > Nick Zitzmann
    > <http://www.chronosnet.com/
    >
  • On Mar 3, 2008, at 9:39 PM, Steven Degutis wrote:

    > I haven't tested this, but I'm almost certain that the thickness of
    > the bottom border is exactly what causes the gradient to become
    > lighter. Perhaps you should follow up on Kyle's advice and try it.

    You're making the assumption that I didn't. I did this in my -
    awakeFromNib method, as I have seen in some sample code:

    [[self window] setAutorecalculatesContentBorderThickness:NO
    forEdge:NSMaxYEdge];
    [[self window] setAutorecalculatesContentBorderThickness:NO
    forEdge:NSMinYEdge];
    [[self window] setContentBorderThickness:0.0f forEdge:NSMaxYEdge];
    [[self window] setContentBorderThickness:30.0f forEdge:NSMinYEdge];

    However, it makes no difference. Did anyone get it to draw lighter
    this way, and if so, then what worked for you?

    Nick Zitzmann
    <http://www.chronosnet.com/>
  • The AppKit release notes cover this:

    ---
    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.
    ---

    The 'lighter gradient' you're after is the top gradient being repeated
    at the bottom.

    -Ken

    On Mon, Mar 3, 2008 at 8:48 PM, Nick Zitzmann <nick...> wrote:
    >
    > On Mar 3, 2008, at 9:39 PM, Steven Degutis wrote:
    >
    >> I haven't tested this, but I'm almost certain that the thickness of
    >> the bottom border is exactly what causes the gradient to become
    >> lighter. Perhaps you should follow up on Kyle's advice and try it.
    >
    >
    > You're making the assumption that I didn't. I did this in my -
    > awakeFromNib method, as I have seen in some sample code:
    >
    > [[self window] setAutorecalculatesContentBorderThickness:NO
    > forEdge:NSMaxYEdge];
    > [[self window] setAutorecalculatesContentBorderThickness:NO
    > forEdge:NSMinYEdge];
    > [[self window] setContentBorderThickness:0.0f forEdge:NSMaxYEdge];
    > [[self window] setContentBorderThickness:30.0f forEdge:NSMinYEdge];
    >
    > However, it makes no difference. Did anyone get it to draw lighter
    > this way, and if so, then what worked for you?
    >
    >
    > Nick Zitzmann
    > <http://www.chronosnet.com/
    >
  • On Mon, Mar 3, 2008 at 11:48 PM, Nick Zitzmann <nick...> wrote:
    > However, it makes no difference. Did anyone get it to draw lighter
    > this way, and if so, then what worked for you?

    You have made the window non-metal, correct?

    --Kyle Sluder
  • On Mar 3, 2008, at 9:54 PM, Ken Ferry wrote:

    > The 'lighter gradient' you're after is the top gradient being repeated
    > at the bottom.

    Thank you. Doing the following worked:

    1. Turning off the textured background
    2. Using the following line in the window controller's -awakeFromNib
    method:

    [[self window] setContentBorderThickness:30.0f forEdge:NSMinYEdge];

    Nick Zitzmann
    <http://www.chronosnet.com/>
  • Is the new iPhone SDK now "fair game" on this list?

    On Mar 3, 2008, at 11:02 PM, Nick Zitzmann wrote:

    >
    > On Mar 3, 2008, at 9:54 PM, Ken Ferry wrote:
    >
    >> The 'lighter gradient' you're after is the top gradient being
    >> repeated
    >> at the bottom.
    >
    >
    > Thank you. Doing the following worked:
    >
    > 1. Turning off the textured background
    > 2. Using the following line in the window controller's -
    > awakeFromNib method:
    >
    > [[self window] setContentBorderThickness:30.0f forEdge:NSMinYEdge];
    >
    > Nick Zitzmann
    > <http://www.chronosnet.com/
  • What did you don't understand in this moderator post ?

    http://www.cocoabuilder.com/archive/message/cocoa/2008/3/8/200765

    "Reposting this just to be crystal clear.

    iPhone 2.0 SDK is entirely covered by NDA, including the
    documentation.  All of it requires login to access it at the iPhone
    Dev Center.

    Items specifically discussed in the announcement are public. But even
    still, they're not appropriate for discussion on this list. ..."

    Le 8 mars 08 à 15:53, William Squires a écrit :

    > Is the new iPhone SDK now "fair game" on this list?
    >
    > On Mar 3, 2008, at 11:02 PM, Nick Zitzmann wrote:
    >
    >>
    >> On Mar 3, 2008, at 9:54 PM, Ken Ferry wrote:
    >>
    >>> The 'lighter gradient' you're after is the top gradient being
    >>> repeated
    >>> at the bottom.
    >>
    >>
    >> Thank you. Doing the following worked:
    >>
    >> 1. Turning off the textured background
    >> 2. Using the following line in the window controller's -
    >> awakeFromNib method:
    >>
    >> [[self window] setContentBorderThickness:30.0f forEdge:NSMinYEdge];
    >>
    >> Nick Zitzmann
    >> <http://www.chronosnet.com/

    >
previous month march 2008 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today