After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 96832 - Support RTL flipping for status bars
Support RTL flipping for status bars
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.1.x
Other other
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 52833
Blocks: 76219
 
 
Reported: 2002-10-25 21:42 UTC by Matthias Clasen
Modified: 2011-02-04 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (3.00 KB, patch)
2002-10-28 21:55 UTC, Matthias Clasen
none Details | Review
revised patch (2.81 KB, patch)
2002-11-02 00:47 UTC, Matthias Clasen
none Details | Review
a flipped statusbar (5.19 KB, image/png)
2002-11-02 00:47 UTC, Matthias Clasen
  Details

Description Matthias Clasen 2002-10-25 21:42:56 UTC
the resize handle should move to the other side.
Comment 1 Matthias Clasen 2002-10-28 07:53:44 UTC
I have some code for this at home, but I failed when trying to draw reasonably-looking 
south-west corner resize grips...
One nasty gotcha with this is that you will run 
into assertions from 
theme engines when gtk starts drawing resize grips in corners 
other than south-east, since there typically is a switch with default: 
g_assert_not_reached()...so all theme engines will need an update when this is 
done.
Comment 2 Matthias Clasen 2002-10-28 21:55:04 UTC
Here is the flipping code for status bars. It needs on the patches
attached to 52833, otherwise you'll run into g_assert_not_reached ().
Comment 3 Matthias Clasen 2002-10-28 21:55:42 UTC
Created attachment 11891 [details] [review]
patch
Comment 4 Owen Taylor 2002-11-01 23:31:28 UTC
The asymetry in dealing with GTK_CONTAINER (widget)->border_width in:

+  if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) 
+    {
+      rect->x = widget->allocation.x + widget->allocation.width - w;
+      edge = GDK_WINDOW_EDGE_SOUTH_EAST; 
+    }
+  else 
+    {
+      rect->x = widget->allocation.x + GTK_CONTAINER
(widget)->border_width +
+	widget->style->xthickness;
+      edge = GDK_WINDOW_EDGE_SOUTH_WEST; 
+    }

looks suspicious to me. 

Wouldn't it be better to have a get_grip_edge() function rather
than pushing it in as the return value here and computing it
separately elsewhere?
Comment 5 Matthias Clasen 2002-11-02 00:46:36 UTC
You're right. Looks suspicious. Here is a new patch which simply
removes the border_width and adds a separate get_grip_edge(). The grip
on the left is still not looking perfect, due to the heavy dark bevel
next to it (see below). Not sure if we can do anything about it.
Looking at IE, the resize grips on Windows seem to be drawn over the
bevel, rather than
inside it.
Comment 6 Matthias Clasen 2002-11-02 00:47:12 UTC
Created attachment 11976 [details] [review]
revised patch
Comment 7 Matthias Clasen 2002-11-02 00:47:56 UTC
Created attachment 11977 [details]
a flipped statusbar
Comment 8 Matthias Clasen 2002-11-22 13:09:30 UTC
Hey Owen, any chance to look at the revised patch ?

I'm still striving for an almost 
complete rtl support in 2.2...
Comment 9 Owen Taylor 2002-12-03 15:17:28 UTC
Looks fine. Not sure if anything can be done about the
drawing. 
Comment 10 Matthias Clasen 2002-12-03 22:01:18 UTC
Committed to HEAD.