Closed Bug 524294 Opened 13 years ago Closed 12 years ago

[Mac] Updater window does not resize to fit text label on localized builds

Categories

(Toolkit :: Application Update, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b11

People

(Reporter: flod, Assigned: robert.strong.bugs)

Details

Attachments

(3 files, 1 obsolete file)

I noticed this problem with Italian (it) builds on Mac OS X (both Leopard and Snow Leopard): the string InfoText (from updater.ini) is longer than the original en-US string and the label is cropped.

On Windows the text is fully displayed, even if the string seems to stop just before the edge (so I don't know if it's a problem with a longer label), while I still have to try on Linux.

I assume (but I didn't verify) this happens also with other Mozilla products (Thunderbird for example) and involves other locales (looking at l10n-mozilla1.9.2, there are localized strings longer than the Italian one).
Comment on attachment 408214 [details]
Attachment with cropped text on OS X

Complete string is "%MOZ_APP_DISPLAYNAME% sta installando gli aggiornamenti e si avvierà fra qualche istante… "
Attachment #408214 - Attachment description: Attachment with cropped text (original string is "%MOZ_APP_DISPLAYNAME% sta installando gli aggiornamenti e si avvierà fra qualche istante… ") → Attachment with cropped text on OS X
The full label is shown in the updater
Moving to appropriate component.
Component: General → Application Update
Product: Firefox → Toolkit
QA Contact: general → application.update
Summary: Updater window does not resize to fit text label on localized builds → [Mac] Updater window does not resize to fit text label on localized builds
dolske, since you have a Mac could you take a look at this?
Hmm, I don't see anything setting sizes of the OS X dialog, so I'd assume it defaults to stretch-to-fit. But it's all ObjC/Cocoa code, which I don't really know.

CCing a couple OS X folks who would know better than I... [code in question is toolkit/mozapps/update/src/updater/progressui_osx.mm].
The size is set in the nib file, it is not stretch-to-fit.

toolkit/mozapps/update/src/updater/macbuild/Contents/Resources/English.lproj/MainMenu.nib

Right now that size is set to 504, you can see this by opening the nib file in Interface Builder, selecting the Window instance, and looking at the content frame width in the Inspector window.
We could fix this by measuring the size of the string as we'd want it drawn and adjusting UI elements appropriately in progressui_osx.mm.
The same for Namoroka and Thunderbird for es-ES locale
Any news on this? Unfortunately the problem is still there (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; it; rv:2.0b2pre) Gecko/20100716 Minefield/4.0b2pre) and it became easier to spot with localized nightly builds
Someone familiar with Mac programming will need to implement what Josh suggested in comment #7
Attached patch patch rev1 (obsolete) — Splinter Review
Josh, this fixes this bug for me but I'm to say the least not familiar with Interface Builder or Cocoa. Thanks.
Assignee: nobody → robert.bugzilla
Status: NEW → ASSIGNED
Attachment #507228 - Flags: review?(joshmoz)
Attached patch patch rev2Splinter Review
Same patch except I used the Interface Builder from xcode 2.5 for this one to lessen the churn in the nib
Attachment #507228 - Attachment is obsolete: true
Attachment #507342 - Flags: review?(joshmoz)
Attachment #507228 - Flags: review?(joshmoz)
Attachment #507342 - Flags: review?(joshmoz) → review+
Attachment #507342 - Flags: approval2.0?
Attachment #507342 - Flags: approval2.0? → approval2.0+
Pushed to mozilla-central
http://hg.mozilla.org/mozilla-central/rev/3f076db5e930
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Flags: in-litmus-
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b11
You need to log in before you can comment on or make changes to this bug.