[maemo-commits] [maemo-commits] r9362 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Jan 26 14:33:32 EET 2007
- Previous message: [maemo-commits] r9361 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Next message: [maemo-commits] r9363 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . modules/input
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: timj Date: 2007-01-26 14:33:30 +0200 (Fri, 26 Jan 2007) New Revision: 9362 Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkstyle.c Log: Wed Jan 24 14:26:29 2007 Tim Janik <timj at imendio.com> * Backports: 2006-09-21 Xan Lopez <xan.lopez at nokia.com> * gtk/gtkstyle.c (draw_insertion_cursor): Change the x coord of the cursor at line start so it's completely visible when we offset it. Fixes NB#38922. Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog =================================================================== --- projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog 2007-01-26 11:42:19 UTC (rev 9361) +++ projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog 2007-01-26 12:33:30 UTC (rev 9362) @@ -1,3 +1,13 @@ +Wed Jan 24 14:26:29 2007 Tim Janik <timj at imendio.com> + + * Backports: + + 2006-09-21 Xan Lopez <xan.lopez at nokia.com> + + * gtk/gtkstyle.c (draw_insertion_cursor): + Change the x coord of the cursor at line start so it's completely visible + when we offset it. Fixes NB#38922. + 2007-01-26 Michael Natterer <mitch at imendio.com> * gtk/gtkentrycompletion.c (gtk_entry_completion_insert_prefix): Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkstyle.c =================================================================== --- projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkstyle.c 2007-01-26 11:42:19 UTC (rev 9361) +++ projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkstyle.c 2007-01-26 12:33:30 UTC (rev 9362) @@ -6672,6 +6672,7 @@ gint i; gfloat cursor_aspect_ratio; gint offset; + gint window_width; /* When changing the shape or size of the cursor here, * propagate the changes to gtktextview.c:text_window_invalidate_cursors(). @@ -6688,6 +6689,13 @@ else offset = stem_width - stem_width / 2; + gdk_drawable_get_size (widget->window, &window_width, NULL); + + if (location->x - offset < 0 && direction == GTK_TEXT_DIR_LTR) + location->x += ABS (location->x - offset); + else if (location->x + offset > window_width && direction == GTK_TEXT_DIR_RTL) + location->x -= location->x + offset - window_width; + for (i = 0; i < stem_width; i++) gdk_draw_line (drawable, gc, location->x + i - offset, location->y,
- Previous message: [maemo-commits] r9361 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Next message: [maemo-commits] r9363 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . modules/input
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]