Inconsistent button sizes for alerts in 10.5

RESOLVED INVALID

Status

RESOLVED INVALID
11 years ago
11 years ago

People

(Reporter: markus.magnuson, Unassigned)

Tracking

Details

Attachments

(3 attachments)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; sv; rv:1.8.1.12pre) Gecko/20080119 Camino/1.6b3pre (like Firefox/2.0.0.12pre)
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; sv; rv:1.8.1.12pre) Gecko/20080119 Camino/1.6b3pre (like Firefox/2.0.0.12pre)

It seems like Apple have screwed up the automatic resizing of buttons in Leopard, for example the "Size To Fit" menu item in Interface Builder (version 3) and the sizeToFit message yields different button sizes. I am attaching a small test project with an example of this.

As a result, the buttons in Camino's alerts have incorrect sizes. I am attaching two images as an example. The generated dialogue is from Camino, and I guess this is constructed by makeButtonWithTitle in nsAlertController [1]. The constructed dialogue I built in IB3, and both buttons are sized by the "Size To Fit" menu item.

The solution is probably to modify the button sizes after using the sizeToFit message, but only if on Leopard.

I am filing a bug at Apple for this inconsistent behaviour.

[1] http://mxr.mozilla.org/seamonkey/source/camino/src/browser/nsAlertController.mm#757

Reproducible: Always
(Reporter)

Comment 1

11 years ago
Created attachment 301916 [details]
Test project to show inconsistent size to fit behaviour.
(Reporter)

Comment 2

11 years ago
Created attachment 301917 [details]
Alert dialogue constructed by Camino.
(Reporter)

Comment 3

11 years ago
Created attachment 301918 [details]
Alert dialogue constructed with IB3.

Comment 4

11 years ago
(In reply to comment #0)
> As a result, the buttons in Camino's alerts have incorrect sizes.

The keychain dialog is an NSAlert, with buttons created entirely by NSAlert itself. We're not going to override AppKit and become inconsistent with the NSAlerts in every other application just because of a difference with IB 3--especially when there's no way of knowing which is canonical.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.