Re: System Preferences window is wider in Leopard? How do you make a Tiger compatible UI?
Re: System Preferences window is wider in Leopard? How do you make a Tiger compatible UI?
- Subject: Re: System Preferences window is wider in Leopard? How do you make a Tiger compatible UI?
- From: email@hidden
- Date: Wed, 9 Apr 2008 20:16:17 +0200
Try this. The firstRun variable makes sure the pane is only resized
once, or System Preferences will crash. Hope this helps.
- (NSView *) mainView {
// Return a different sized view for each version of OS X
// Leopard has a wider system prefs window than Tiger
// Include the Carbon framework for the Gestalt function
SInt32 MacOSXVersionNumber;
if (Gestalt(gestaltSystemVersion, &MacOSXVersionNumber) == noErr) {
if (MacOSXVersionNumber <= 0x01050) {
if (firstRun == YES) {
[prefWindow setContentSize:NSMakeSize(594.0, 354.0)];
// Resize for Tiger
firstRun = NO;
}
}
}
return [super mainView];
}
On Wed, Apr 9, 2008 at 7:06 PM, Dave Camp <email@hidden> wrote:
> After designing the UI for a new System Preferences pane I've discovered
> that the window size in Leopard is 75 pixels wider than it was in Tiger or
> earlier OS releases. The net result appears to be that my shiny new UI is
> clipped on the right side in Tiger. Ugh. I've sent feedback that the docs
> are incorrect here and need to be updated...
>
> In the mean time, what is the correct way to handle this?
>
> From what I've read on the net adding springs in IB doesn't help. Would it
> be safe for me to resize the preferences window to be 75 pixels wider on
> Tiger while my pane is visible (and size it back down when my pane is
> deselected)?
>
> Do I have to make my UI narrower and have an obnoxious amount of dead space
> around the edges on Leopard?
>
> Thoughts?
>
> Dave
>
> _______________________________________________
>
> 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
>
_______________________________________________
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