diff options
author | Havoc Pennington <hp@pobox.com> | 2002-02-25 04:19:05 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-02-25 04:19:05 +0000 |
commit | 8ddb92e4911f0f9304be211382b4e80258d7804b (patch) | |
tree | 40c503f9ac35f28487c7bd1d67944a82a7411c87 /gtk/gtklabel.c | |
parent | 3e7279cff4cb1cd940a9ad22a5abf5fd4b3bfa43 (diff) | |
download | gtk+-8ddb92e4911f0f9304be211382b4e80258d7804b.tar.gz |
change to pass in the cursor direction always, not just when we need an
2002-02-24 Havoc Pennington <hp@pobox.com>
* gtk/gtkstyle.c (_gtk_draw_insertion_cursor): change to pass in
the cursor direction always, not just when we need an arrow, so we
can flip the cursor around its axis for RTL. Resolves #72372
* gtk/gtkentry.c (gtk_entry_draw_cursor): update for
draw_insertion_cursor change
* gtk/gtklabel.c (gtk_label_draw_cursor): ditto
* gtk/gtktextdisplay.c (gtk_text_layout_draw): ditto
Diffstat (limited to 'gtk/gtklabel.c')
-rw-r--r-- | gtk/gtklabel.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 5341d749f7..8538e458f7 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -1694,6 +1694,8 @@ gtk_label_draw_cursor (GtkLabel *label, gint xoffset, gint yoffset) "gtk-split-cursor", &split_cursor, NULL); + dir1 = widget_direction; + if (split_cursor) { gc1 = label->select_info->cursor_gc; @@ -1702,7 +1704,6 @@ gtk_label_draw_cursor (GtkLabel *label, gint xoffset, gint yoffset) if (strong_pos.x != weak_pos.x || strong_pos.y != weak_pos.y) { - dir1 = widget_direction; dir2 = (widget_direction == GTK_TEXT_DIR_LTR) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR; gc2 = widget->style->black_gc; @@ -1725,9 +1726,10 @@ gtk_label_draw_cursor (GtkLabel *label, gint xoffset, gint yoffset) cursor_location.height = PANGO_PIXELS (cursor1->height); _gtk_draw_insertion_cursor (widget, widget->window, gc1, - &cursor_location, dir1); + &cursor_location, dir1, + dir2 != GTK_TEXT_DIR_NONE); - if (gc2) + if (dir2 != GTK_TEXT_DIR_NONE) { cursor_location.x = xoffset + PANGO_PIXELS (cursor2->x); cursor_location.y = yoffset + PANGO_PIXELS (cursor2->y); @@ -1735,7 +1737,7 @@ gtk_label_draw_cursor (GtkLabel *label, gint xoffset, gint yoffset) cursor_location.height = PANGO_PIXELS (cursor2->height); _gtk_draw_insertion_cursor (widget, widget->window, gc2, - &cursor_location, dir2); + &cursor_location, dir2, TRUE); } } } |