Bug 483564. Adjust caret location so that GTK themes draw RTL carets correctly. r+sr=roc

--HG--
extra : rebase_source : d3ede4134e9e73b841823547212f1c57144ed4a7
This commit is contained in:
Karl Tomlinson 2009-04-10 13:30:01 +12:00
Родитель 324c70bfd1
Коммит c1acd494d0
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -1496,9 +1496,15 @@ static gint
moz_gtk_caret_paint(GdkDrawable* drawable, GdkRectangle* rect, moz_gtk_caret_paint(GdkDrawable* drawable, GdkRectangle* rect,
GdkRectangle* cliprect, GtkTextDirection direction) GdkRectangle* cliprect, GtkTextDirection direction)
{ {
GdkRectangle location = *rect;
if (direction == GTK_TEXT_DIR_RTL) {
/* gtk_draw_insertion_cursor ignores location.width */
location.x = rect->x + rect->width;
}
ensure_entry_widget(); ensure_entry_widget();
gtk_draw_insertion_cursor(gEntryWidget, drawable, cliprect, gtk_draw_insertion_cursor(gEntryWidget, drawable, cliprect,
rect, TRUE, direction, FALSE); &location, TRUE, direction, FALSE);
return MOZ_GTK_SUCCESS; return MOZ_GTK_SUCCESS;
} }