diff options
author | Owen Taylor <otaylor@redhat.com> | 2004-03-12 22:51:13 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2004-03-12 22:51:13 +0000 |
commit | dcb6900c615e519bc1bc590f80e20620fcba19d7 (patch) | |
tree | e8afaf9d32749d5f93624da3dffd2ce572761829 /gtk/gtkarrow.c | |
parent | 543b1c2f78010616b963d0dad0211ecd8e1d29a9 (diff) | |
download | gtk+-dcb6900c615e519bc1bc590f80e20620fcba19d7.tar.gz |
Swap GTK_ARROW_LEFT and GTK_ARROW_RIGHT for GTK_TEXT_DIR_LTR. (#129159,
Fri Mar 12 17:20:15 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkarrow.c (gtk_arrow_expose): Swap GTK_ARROW_LEFT
and GTK_ARROW_RIGHT for GTK_TEXT_DIR_LTR. (#129159,
Semion Chichelnitsky)
* gtk/gtkpathbar.c gtk/gtktoolbar.c: Remove no-longer-needed
gtk_toolbar_direction-changed handlers and explicit
flipping of GtkArrow widgets.
Diffstat (limited to 'gtk/gtkarrow.c')
-rw-r--r-- | gtk/gtkarrow.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk/gtkarrow.c b/gtk/gtkarrow.c index 5054769ddf..89dbf510ba 100644 --- a/gtk/gtkarrow.c +++ b/gtk/gtkarrow.c @@ -234,6 +234,7 @@ gtk_arrow_expose (GtkWidget *widget, gint x, y; gint extent; gfloat xalign; + GtkArrowType effective_arrow_type; if (GTK_WIDGET_DRAWABLE (widget)) { @@ -243,11 +244,18 @@ gtk_arrow_expose (GtkWidget *widget, width = widget->allocation.width - misc->xpad * 2; height = widget->allocation.height - misc->ypad * 2; extent = MIN (width, height) * 0.7; + effective_arrow_type = arrow->arrow_type; if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) xalign = misc->xalign; else - xalign = 1.0 - misc->xalign; + { + xalign = 1.0 - misc->xalign; + if (arrow->arrow_type == GTK_ARROW_LEFT) + effective_arrow_type = GTK_ARROW_RIGHT; + else if (arrow->arrow_type == GTK_ARROW_RIGHT) + effective_arrow_type = GTK_ARROW_LEFT; + } x = floor (widget->allocation.x + misc->xpad + ((widget->allocation.width - extent) * xalign) @@ -273,7 +281,7 @@ gtk_arrow_expose (GtkWidget *widget, gtk_paint_arrow (widget->style, widget->window, widget->state, shadow_type, &event->area, widget, "arrow", - arrow->arrow_type, TRUE, + effective_arrow_type, TRUE, x, y, extent, extent); } |