Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Safari-Style Metal Windows

Safari-Style Metal Windows
Thread Tools
Mac Elite
Join Date: May 2002
Location: New York City
Status: Offline
Reply With Quote
Feb 6, 2004, 10:56 PM
 
I just found out how to use Safari's metal windows, where the bottom corners are not rounded, but squared like regular Aqua windows.

Here's how to do it in case anyone wants to know:

1.) Make a subclass of NSWindowController (I just called it MyWindowController).
2.) Create an outlet named "mainWindow".
3.) Create the files (Command-Option-F).
4.) Instantiate the subclass, and connect the outlets.
5.) Put the following in the header (.h) file for MyWindowController:

Code:
@protocol MyCoolProtocol - (void) setBottomCornerRounded:(BOOL) flag; @end
6.) Put the following in the interface (.m) file for MyWindowController:

Code:
- (void)awakeFromNib { if ([mainWindow respondsToSelector: @selector(setBottomCornerRounded:)]) { [(id < MyCoolProtocol >)mainWindow setBottomCornerRounded:NO]; } }
7.) Build and run. :-)
(Last edited by zachs; Feb 7, 2004 at 06:24 PM. )
     
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status: Offline
Reply With Quote
Feb 7, 2004, 06:01 PM
 
just so you know, the first internal line of that function has been severely mangled. That's not valid Objective-C code.

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
zachs  (op)
Mac Elite
Join Date: May 2002
Location: New York City
Status: Offline
Reply With Quote
Feb 7, 2004, 06:25 PM
 
Originally posted by Detrius:
just so you know, the first internal line of that function has been severely mangled. That's not valid Objective-C code.
Oops, that wasn't supposed to be there. Thanks.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:57 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2