summaryrefslogtreecommitdiff
path: root/gtk/gtkentry.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-02-25 04:19:05 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-02-25 04:19:05 +0000
commit8ddb92e4911f0f9304be211382b4e80258d7804b (patch)
tree40c503f9ac35f28487c7bd1d67944a82a7411c87 /gtk/gtkentry.c
parent3e7279cff4cb1cd940a9ad22a5abf5fd4b3bfa43 (diff)
downloadgtk+-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/gtkentry.c')
-rw-r--r--gtk/gtkentry.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 5a847e9a88..3a4dcfbaa9 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -2701,6 +2701,8 @@ gtk_entry_draw_cursor (GtkEntry *entry,
"gtk-split-cursor", &split_cursor,
NULL);
+ dir1 = widget_direction;
+
if (split_cursor)
{
gc1 = entry->cursor_gc;
@@ -2708,7 +2710,6 @@ gtk_entry_draw_cursor (GtkEntry *entry,
if (weak_x != strong_x)
{
- dir1 = widget_direction;
dir2 = (widget_direction == GTK_TEXT_DIR_LTR) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR;
gc2 = widget->style->text_gc[GTK_STATE_NORMAL];
@@ -2731,13 +2732,15 @@ gtk_entry_draw_cursor (GtkEntry *entry,
cursor_location.height = text_area_height - 2 * INNER_BORDER ;
_gtk_draw_insertion_cursor (widget, entry->text_area, gc1,
- &cursor_location, dir1);
+ &cursor_location, dir1,
+ dir2 != GTK_TEXT_DIR_NONE);
- if (gc2)
+ if (dir2 != GTK_TEXT_DIR_NONE)
{
cursor_location.x = xoffset + x2;
_gtk_draw_insertion_cursor (widget, entry->text_area, gc2,
- &cursor_location, dir2);
+ &cursor_location, dir2,
+ TRUE);
}
}
}