+2002-12-03 Matthias Clasen <maclas@gmx.de>
+
+ RTL flipping for statusbars. (#96832)
+
+ * gtk/gtkstatusbar.c (get_grip_edge): New function returning the
+ appropriate grip edge for a statusbar.
+ (get_grip_rect): Do the right thing in RTL mode.
+ (gtk_statusbar_button_press): Initiate a resize drag on the
+ appropriate edge.
+ (gtk_statusbar_expose_event): Paint the resize grip for the
+ appropriate edge.
+
2002-12-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtkstyle.c: Fix doc comment.
+2002-12-03 Matthias Clasen <maclas@gmx.de>
+
+ RTL flipping for statusbars. (#96832)
+
+ * gtk/gtkstatusbar.c (get_grip_edge): New function returning the
+ appropriate grip edge for a statusbar.
+ (get_grip_rect): Do the right thing in RTL mode.
+ (gtk_statusbar_button_press): Initiate a resize drag on the
+ appropriate edge.
+ (gtk_statusbar_expose_event): Paint the resize grip for the
+ appropriate edge.
+
2002-12-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtkstyle.c: Fix doc comment.
+2002-12-03 Matthias Clasen <maclas@gmx.de>
+
+ RTL flipping for statusbars. (#96832)
+
+ * gtk/gtkstatusbar.c (get_grip_edge): New function returning the
+ appropriate grip edge for a statusbar.
+ (get_grip_rect): Do the right thing in RTL mode.
+ (gtk_statusbar_button_press): Initiate a resize drag on the
+ appropriate edge.
+ (gtk_statusbar_expose_event): Paint the resize grip for the
+ appropriate edge.
+
2002-12-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtkstyle.c: Fix doc comment.
+2002-12-03 Matthias Clasen <maclas@gmx.de>
+
+ RTL flipping for statusbars. (#96832)
+
+ * gtk/gtkstatusbar.c (get_grip_edge): New function returning the
+ appropriate grip edge for a statusbar.
+ (get_grip_rect): Do the right thing in RTL mode.
+ (gtk_statusbar_button_press): Initiate a resize drag on the
+ appropriate edge.
+ (gtk_statusbar_expose_event): Paint the resize grip for the
+ appropriate edge.
+
2002-12-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtkstyle.c: Fix doc comment.
+2002-12-03 Matthias Clasen <maclas@gmx.de>
+
+ RTL flipping for statusbars. (#96832)
+
+ * gtk/gtkstatusbar.c (get_grip_edge): New function returning the
+ appropriate grip edge for a statusbar.
+ (get_grip_rect): Do the right thing in RTL mode.
+ (gtk_statusbar_button_press): Initiate a resize drag on the
+ appropriate edge.
+ (gtk_statusbar_expose_event): Paint the resize grip for the
+ appropriate edge.
+
2002-12-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtkstyle.c: Fix doc comment.
+2002-12-03 Matthias Clasen <maclas@gmx.de>
+
+ RTL flipping for statusbars. (#96832)
+
+ * gtk/gtkstatusbar.c (get_grip_edge): New function returning the
+ appropriate grip edge for a statusbar.
+ (get_grip_rect): Do the right thing in RTL mode.
+ (gtk_statusbar_button_press): Initiate a resize drag on the
+ appropriate edge.
+ (gtk_statusbar_expose_event): Paint the resize grip for the
+ appropriate edge.
+
2002-12-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtkstyle.c: Fix doc comment.
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
+static GdkWindowEdge
+get_grip_edge (GtkStatusbar *statusbar)
+{
+ GtkWidget *widget = GTK_WIDGET (statusbar);
+
+ if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
+ return GDK_WINDOW_EDGE_SOUTH_EAST;
+ else
+ return GDK_WINDOW_EDGE_SOUTH_WEST;
+}
+
static void
get_grip_rect (GtkStatusbar *statusbar,
GdkRectangle *rect)
if (h > (widget->allocation.height - widget->style->ythickness))
h = widget->allocation.height - widget->style->ythickness;
- rect->x = widget->allocation.x + widget->allocation.width - w;
- rect->y = widget->allocation.y + widget->allocation.height - h;
rect->width = w;
rect->height = h;
+ rect->y = widget->allocation.y + widget->allocation.height - h;
+
+ if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
+ rect->x = widget->allocation.x + widget->allocation.width - w;
+ else
+ rect->x = widget->allocation.x + widget->style->xthickness;
}
static void
{
GtkStatusbar *statusbar;
GtkWidget *ancestor;
+ GdkWindowEdge edge;
statusbar = GTK_STATUSBAR (widget);
if (!GTK_IS_WINDOW (ancestor))
return FALSE;
+ edge = get_grip_edge (statusbar);
+
if (event->button == 1)
gtk_window_begin_resize_drag (GTK_WINDOW (ancestor),
- GDK_WINDOW_EDGE_SOUTH_EAST,
+ edge,
event->button,
event->x_root, event->y_root,
event->time);
if (statusbar->has_resize_grip)
{
+ GdkWindowEdge edge;
+
+ edge = get_grip_edge (statusbar);
+
get_grip_rect (statusbar, &rect);
gtk_paint_resize_grip (widget->style,
NULL,
widget,
"statusbar",
- GDK_WINDOW_EDGE_SOUTH_EAST,
+ edge,
rect.x, rect.y,
/* don't draw grip over the frame, though you
* can click on the frame.