Closed Bug 316748 Opened 19 years ago Closed 17 years ago

[RTL] [GTK] dropdown arrow is on the wrong side

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta3

People

(Reporter: tracy, Assigned: twanno)

References

(Blocks 1 open bug)

Details

(Keywords: intl, rtl)

Attachments

(1 file, 2 obsolete files)

seen on ar l10n build from 11/15

-go to Prefs | Content | Fonts and Colors

tested results:
notice the text for the two dropdown menus (font type and size) overlaps the down arrow for those menus.

expected results:  the text should not overlap the dropdown arrow
Component: ar-JO / Arabic → Preferences
Product: Mozilla Localizations → Firefox
Version: unspecified → 1.5 Branch
*** Bug 316749 has been marked as a duplicate of this bug. ***
this is happening in both arabic and hebrew which are right to left languages. it's not happening with left to right locales.
Depends on: 306980
Summary: size and font type overlap drop down arrow in content preference → size and font type overlap drop down arrow in content preferenc
Reassigning to Prefs asignee, I don't think I'm responsible for this sort of things.
Assignee: aymanh → nobody
QA Contact: aymanh → preferences
Blocks: 306980
No longer depends on: 306980
see also Bug 297790. i think these two bugs are actually from the same origin.
Component: Preferences → Menus
Component: Menus → Layout: BiDi Hebrew & Arabic
Product: Firefox → Core
Version: 1.5 Branch → Trunk
Widget:GTK2 nsITheme issue.
Component: Layout: BiDi Hebrew & Arabic → Widget: Gtk
Keywords: helpwanted
QA Contact: preferences → gtk
Keywords: intl
*** Bug 347621 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
Summary: size and font type overlap drop down arrow in content preferenc → [RTL] [GTK] dropdown arrow is on the wrong side
Status: ASSIGNED → NEW
Attached patch fix some GTK RTL issues (obsolete) — Splinter Review
Attachment #292752 - Flags: superreview?(roc)
Attachment #292752 - Flags: review?(roc)
Attached patch fix some GTK RTL issues (obsolete) — Splinter Review
This patch will draw certain GTK Widgets RTL or LTR not depending on the text direction of the operating system, but only on Mozilla's current text direction.
This means that this patch makes it possible to draw RTL widgets for a RTL Firefox on a LTR OS.

This patch will fix the RTL display for the following widgets: dropdown menu (this bug), tabs (bug 402247) and checkbox/radio menu items (part of bug 297790). And it makes menu arrows display correctly for RTL locales on a LTR OS.
Assignee: nobody → twanno
Status: NEW → ASSIGNED
Attachment #292756 - Flags: superreview?(roc)
Attachment #292756 - Flags: review?(roc)
Attachment #292752 - Attachment is obsolete: true
Attachment #292752 - Flags: superreview?(roc)
Attachment #292752 - Flags: review?(roc)
Keywords: helpwanted
+                    rect->x - rect->width + 2 : rect->x + rect->width - 2;

I don't see how rect->x - rect->width makes sense. rect->x is always the left side of the rectangle, right?

+static void GetTextDirection(nsIFrame* aFrame, GtkTextDirection* aDirection)

Just return a GtkTextDirection parameter directly. Out parameters are evil unless you have to use them.
(In reply to comment #9)
> +                    rect->x - rect->width + 2 : rect->x + rect->width - 2;
> 
> I don't see how rect->x - rect->width makes sense. rect->x is always the left
> side of the rectangle, right?

It is the way the left border of the active tab is painted (bug 402247); The actual tab is already painted at this point, but the same tab (the tab before the selected tab) is used again to draw the 2px wide left border. 

For RTL tabs, the way I thought bug 402247 should be fixed, the right border of the active tab has to be painted. In that case we must shift the tab (its width -  2)px to the left to draw the 2px right border of the active tab. 

But there may be other ways to fix bug 402247, so I removed the fix I had in mind for the tabs from this patch and I will do that work in the appropriate bug.
Attachment #292756 - Attachment is obsolete: true
Attachment #292845 - Flags: superreview?(roc)
Attachment #292845 - Flags: review?(roc)
Attachment #292756 - Flags: superreview?(roc)
Attachment #292756 - Flags: review?(roc)
Attachment #292845 - Flags: superreview?(roc)
Attachment #292845 - Flags: superreview+
Attachment #292845 - Flags: review?(roc)
Attachment #292845 - Flags: review+
Attachment #292845 - Flags: approval1.9?
Attachment #292845 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
I took the liberty of cleaning up some whitespace in gtkdrawing.c when I landed this.

Checking in widget/src/gtk2/gtk2drawing.c;
/cvsroot/mozilla/widget/src/gtk2/gtk2drawing.c,v  <--  gtk2drawing.c
new revision: 1.51; previous revision: 1.50
done
Checking in widget/src/gtk2/gtkdrawing.h;
/cvsroot/mozilla/widget/src/gtk2/gtkdrawing.h,v  <--  gtkdrawing.h
new revision: 1.43; previous revision: 1.42
done
Checking in widget/src/gtk2/nsNativeThemeGTK.cpp;
/cvsroot/mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp,v  <--  nsNativeThemeGTK.cpp
new revision: 1.123; previous revision: 1.122
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M11
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: