Closed Bug 593942 Opened 14 years ago Closed 14 years ago

Print dialog laid out badly in right-to-left windows

Categories

(Core :: Widget: Win32, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b7
Tracking Status
blocking2.0 --- final+

People

(Reporter: smontagu, Assigned: smontagu)

Details

(Keywords: rtl)

Attachments

(2 files)

Attached image Print dialog in Hebrew
The radio buttons in the "print frames" section of the print dialog are aligned somewhere in the middle of the box instead of to the right of it as expected. They are aligned correctly relatively to one another, so at least some kind of right-to-left processing is happening.

The bug can be reproduced on Hebrew Windows XP, either in the Hebrew localization or by setting intl.uidirection.en-US to "rtl" in about:config. It's probable that it won't be reproducable in a non-localized version of Windows, though.
Is this one of the system windows we used a surrogate parent on?
Yes. 

In the meantime I located where the problem is - PrintHookProc in http://mxr.mozilla.org/mozilla-central/source/embedding/components/printingui/src/win/nsPrintDialogUtil.cpp sizes and positions the custom controls relative to the existing controls in the system dialog.

It needs to detect the window direction and do stuff like
 rect.SetRect(rad1Rect.right - rbWidth, y, rbWidth,radHgt);
instead of
 rect.SetRect(rad1Rect.left, y, rbWidth,radHgt);
in the RTL case

The position of the "print frames" group box and the OK and Cancel buttons also needs to change.

I can take this, but I probably won't get to it before next week.
Assignee: nobody → smontagu
blocking2.0: --- → ?
Attached patch patchSplinter Review
The fix was easier than I expected, for a change ;-)
Attachment #472970 - Flags: review?(jmathies)
Comment on attachment 472970 [details] [diff] [review]
patch

code looks ok to me, although I'm not a peer in embedding. I'm a little confused as to why this is in embedding, don't we have print dialog code in widget as well?)
Attachment #472970 - Flags: review?(jmathies) → review+
Attachment #472970 - Flags: approval2.0?
Comment on attachment 472970 [details] [diff] [review]
patch

a2.0=dbaron
Attachment #472970 - Flags: approval2.0? → approval2.0+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: