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/gtktextdisplay.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/gtktextdisplay.c')
-rw-r--r-- | gtk/gtktextdisplay.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c index b3acdab830..cfb5225d74 100644 --- a/gtk/gtktextdisplay.c +++ b/gtk/gtktextdisplay.c @@ -842,16 +842,12 @@ gtk_text_layout_draw (GtkTextLayout *layout, else gc = widget->style->text_gc[GTK_STATE_NORMAL]; + dir = line_display->direction; if (have_strong && have_weak) { - dir = line_display->direction; if (!cursor->is_strong) dir = (dir == GTK_TEXT_DIR_RTL) ? GTK_TEXT_DIR_LTR : GTK_TEXT_DIR_RTL; } - else - { - dir = GTK_TEXT_DIR_NONE; - } cursor_location.x = line_display->x_offset + cursor->x - x_offset; cursor_location.y = current_y + line_display->top_margin + cursor->y; @@ -859,7 +855,8 @@ gtk_text_layout_draw (GtkTextLayout *layout, cursor_location.height = cursor->height; gdk_gc_set_clip_rectangle(gc, &clip); - _gtk_draw_insertion_cursor (widget, drawable, gc, &cursor_location, dir); + _gtk_draw_insertion_cursor (widget, drawable, gc, &cursor_location, + dir, have_strong && have_weak); gdk_gc_set_clip_rectangle (gc, NULL); cursor_list = cursor_list->next; |