GNOME Bugzilla – Bug 96832
Support RTL flipping for status bars
Last modified: 2011-02-04 16:11:52 UTC
the resize handle should move to the other side.
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.
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 ().
Created attachment 11891 [details] [review] patch
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?
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.
Created attachment 11976 [details] [review] revised patch
Created attachment 11977 [details] a flipped statusbar
Hey Owen, any chance to look at the revised patch ? I'm still striving for an almost complete rtl support in 2.2...
Looks fine. Not sure if anything can be done about the drawing.
Committed to HEAD.