Closed
Bug 477590
Opened 16 years ago
Closed 16 years ago
[Mac] Search widgets look wrong in RTL mode
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.9.2a1
People
(Reporter: mstange, Assigned: mstange)
References
Details
(Keywords: rtl, verified1.9.1)
Attachments
(2 files, 8 obsolete files)
2.46 KB,
image/png
|
Details | |
12.25 KB,
patch
|
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
See bug 450800 comment 41 and 43: In RTL mode, both the search icon and the cancel button are on the left.
We should either draw the search icon at the logical start or lock the cancel button at the right.
Comment 1•16 years ago
|
||
(In reply to comment #0)
> We should either draw the search icon at the logical start or lock the cancel
> button at the right.
The former would be the ideal fix. The latter would be workaround, and while it would make the search field look balanced, I'm not sure if a cancel/clear button at the logical start makes sense interaction-wise.
Updated•16 years ago
|
Summary: Searchfields look wrong in RTL mode → [OS X] Search widgets look wrong in RTL mode
Updated•16 years ago
|
Summary: [OS X] Search widgets look wrong in RTL mode → [Mac] Search widgets look wrong in RTL mode
Comment 2•16 years ago
|
||
Similar things can also be seen for rtl locales on Windows. The clear icon isn't shown at all. Markus, shall I better file a new bug on that? I think so because we are using a native widget on OS X.
Assignee | ||
Comment 3•16 years ago
|
||
(In reply to comment #2)
> Similar things can also be seen for rtl locales on Windows. The clear icon
> isn't shown at all. Markus, shall I better file a new bug on that?
Yes, please.
Comment 4•16 years ago
|
||
Filed as bug 478517
Comment 5•16 years ago
|
||
Markus, would you have time to fix it for FF3.1?
Comment 6•16 years ago
|
||
(In reply to comment #0)
> We should either draw the search icon at the logical start or lock the cancel
> button at the right.
This patch implements the former approach. I haven't tested it myself though. Could someone with a Mac please test it?
Comment 7•16 years ago
|
||
That patch is wrong in several ways. You're adding the padding on the wrong side; the search icon is internally still drawn on the left. And you're flipping the whole textbox, including the clear icon and the text content.
Comment 8•16 years ago
|
||
(In reply to comment #7)
> That patch is wrong in several ways. You're adding the padding on the wrong
> side;
How come? The right padding should be -moz-padding-end and the left padding should be -moz-padding-start, right?
> the search icon is internally still drawn on the left.
Hmm, does scaleX(-1) affect the paddings as well? I was assuming that it doesn't...
> And you're
> flipping the whole textbox, including the clear icon and the text content.
Oops. That should be corrected by specifying scaleX(1) on the textbox-input-box hbox, right?
Updated•16 years ago
|
Attachment #372194 -
Attachment is obsolete: true
Attachment #372194 -
Flags: review?(mstange)
Comment 9•16 years ago
|
||
(In reply to comment #8)
> (In reply to comment #7)
> > That patch is wrong in several ways. You're adding the padding on the wrong
> > side;
>
> How come? The right padding should be -moz-padding-end and the left padding
> should be -moz-padding-start, right?
>
> > the search icon is internally still drawn on the left.
>
> Hmm, does scaleX(-1) affect the paddings as well? I was assuming that it
> doesn't...
It takes the whole thing and draws it mirrored.
> > And you're
> > flipping the whole textbox, including the clear icon and the text content.
>
> Oops. That should be corrected by specifying scaleX(1) on the
> textbox-input-box hbox, right?
textbox-input-box is right, but scaleX(1) would be a no-op.
Assignee | ||
Comment 10•16 years ago
|
||
Ehsan, may I take this bug? Sorry that I didn't get to it earlier.
I'm working on a patch that doesn't need additional CSS styles and instead mirrors the control in nsNativeThemeCocoa.mm.
Assignee | ||
Comment 11•16 years ago
|
||
I haven't tested it on 10.4, but this should be relatively complete.
Comment 12•16 years ago
|
||
(In reply to comment #10)
> Ehsan, may I take this bug? Sorry that I didn't get to it earlier.
> I'm working on a patch that doesn't need additional CSS styles and instead
> mirrors the control in nsNativeThemeCocoa.mm.
Sure, what you're doing is much better. :-)
Assignee: ehsan.akhgari → mstange
Updated•16 years ago
|
Blocks: 477592
Component: XUL Widgets → Widget: Cocoa
Product: Toolkit → Core
QA Contact: xul.widgets → cocoa
Assignee | ||
Comment 13•16 years ago
|
||
Attachment #372201 -
Attachment is obsolete: true
Attachment #372226 -
Flags: superreview?(roc)
Attachment #372226 -
Flags: review?(joshmoz)
Assignee | ||
Updated•16 years ago
|
Attachment #372226 -
Flags: review?(dao)
Assignee | ||
Comment 14•16 years ago
|
||
With the patch, all controls that we draw with NSCells will be mirrored for RTL frames, even dropdowns and checkboxes. Is that the right thing to do?
Updated•16 years ago
|
Attachment #372226 -
Flags: review?(dao) → review+
Comment 15•16 years ago
|
||
(In reply to comment #14)
> Created an attachment (id=372227) [details]
> screenshot with patch
>
> With the patch, all controls that we draw with NSCells will be mirrored for RTL
> frames, even dropdowns and checkboxes. Is that the right thing to do?
Probably not. I'm not familiar with RTL conventions on Mac, but at least on Linux and Windows, some controls are mirrored in this way (like drop-downs for example), but things like checkboxes do not get mirrored.
I think you need to check what other RTL apps on Mac do...
Attachment #372226 -
Flags: review?(joshmoz) → review+
Assignee | ||
Comment 16•16 years ago
|
||
(In reply to comment #15)
> I think you need to check what other RTL apps on Mac do...
I have no idea how to do that. I've tried selecting different RTL languages in the System International preferences, but that didn't change anything, probably because those languages aren't supported by any app that I tested. And AFAICT there's no RTL language among the ones that Mac OS X supports natively:
http://support.apple.com/kb/HT3155
Yehuda, you've done Mac RTL stuff before, can you help us out?
Comment 17•16 years ago
|
||
(In reply to comment #16)
> AFAICT there's no RTL language among the ones that Mac OS X supports natively:
> http://support.apple.com/kb/HT3155
>
This is correct. Apple does not supply out-of-the-box support for RTL languages. Support for Hebrew is developed and distributed separately by iDigital - the local Apple distributor. There might be similar packages for Arabic and Farsi.
I never installed this package because:
A. It looks like a Beta - with many elements still drawn the wrong way. (e.g. the folders on the left in Mail and Finder as seen in this screen-shot: http://skitch.com/ziv_kitaro/i16i/1)
B. I'm too used to the LTR layout.
From looking at the screen-shots around the net, it looks like some of the controls are mirrored and some are not. Ehsan is right about the checkbox. It looks wrong when mirrored.
See more screenshots here:
http://osx86heb.darkbb.com/portal-110.htm#news_110
> Yehuda, you've done Mac RTL stuff before, can you help us out?
Sure. Let me know if you need anything else.
(In reply to comment #17)
> This is correct. Apple does not supply out-of-the-box support for RTL
> languages. Support for Hebrew is developed and distributed separately by
> iDigital - the local Apple distributor. There might be similar packages for
> Arabic and Farsi.
Indeed, see http://www.emiratesmac.com/forums/blog/5090-arabic-leopard-out.html for Arabic.
IB3 on 10.5 supposedly supports a RTL pop-up button widget, but I've never been able to coax it into appearing, so I assume no native apps are using it (Mellel, at least, does not appear to, though I think it still supports 10.4, anyway).
IMO, the pop-up button and combobox controls probably make the most sense to flip, since right-aligned text flush up against the blue endcap just looks "wrong" to me (regular buttons you flip, of course, but since they're symmetrical, they're not noticeable). But my rule has generally been "what does Mellel do?" ;)
Comment 19•16 years ago
|
||
Based on the comments posted here, I think we need a new patch which doesn't flip checkboxes but continues to flip drop-downs.
Whiteboard: [needs new patch]
Assignee | ||
Comment 20•16 years ago
|
||
Attachment #372226 -
Attachment is obsolete: true
Attachment #372227 -
Attachment is obsolete: true
Attachment #372374 -
Flags: superreview?(roc)
Attachment #372226 -
Flags: superreview?(roc)
Assignee | ||
Comment 21•16 years ago
|
||
Oops, forgot to qrefresh.
Attachment #372374 -
Attachment is obsolete: true
Attachment #372375 -
Flags: superreview?(roc)
Attachment #372374 -
Flags: superreview?(roc)
Assignee | ||
Updated•16 years ago
|
Whiteboard: [needs new patch]
Attachment #372375 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 22•16 years ago
|
||
Attachment #372387 -
Flags: review?(roc)
Attachment #372387 -
Flags: review?(roc) → review+
Assignee | ||
Comment 23•16 years ago
|
||
Tryserver told me that the searchfield-mirrored-when-rtl.xul test fails on both Windows and Linux, so I've enabled it only for Mac.
Attachment #372375 -
Attachment is obsolete: true
Attachment #372387 -
Attachment is obsolete: true
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Whiteboard: [needs landing]
Comment 24•16 years ago
|
||
You need to update your tree and merge in textbox.css.
Assignee | ||
Comment 25•16 years ago
|
||
Attachment #373098 -
Attachment is obsolete: true
Comment 26•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → mozilla1.9.2a1
Comment 27•16 years ago
|
||
We should probably take this on branch, because of the rtl improvements and because it makes it easier for themes to use -moz-appearance: searchfield, which has been introduced in beta 3.
Assignee | ||
Updated•16 years ago
|
Attachment #373107 -
Flags: approval1.9.1?
Comment 28•16 years ago
|
||
Comment on attachment 373107 [details] [diff] [review]
updated, for checkin
a191=beltzner
Attachment #373107 -
Flags: approval1.9.1? → approval1.9.1+
Comment 29•16 years ago
|
||
Keywords: fixed1.9.1
Comment 30•16 years ago
|
||
Verified with:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fa; rv:1.9.2a1pre) Gecko/20090419 Minefield/3.6a1pre ID:20090419030918
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fa; rv:1.9.1b4pre) Gecko/20090419 Shiretoko/3.5b4pre ID:20090419031029
The search icon in the search bar is still a bit mis-aligned. I'll file a new bug on this issue.
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.1 → verified1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•