mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
Revert the clamping of cursor coordinates, since it causes really ugly
2007-09-08 Matthias Clasen <mclasen@redhat.com> * gtk/gtkstyle.c (draw_insertion_cursor): Revert the clamping of cursor coordinates, since it causes really ugly drawing artifacts with horizontal scrolling. (#471215, Yevgen Muntyan) svn path=/trunk/; revision=18765
This commit is contained in:
parent
fe23d9ffcb
commit
18475a4aa3
@ -1,3 +1,9 @@
|
|||||||
|
2007-09-08 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkstyle.c (draw_insertion_cursor): Revert the clamping
|
||||||
|
of cursor coordinates, since it causes really ugly drawing
|
||||||
|
artifacts with horizontal scrolling. (#471215, Yevgen Muntyan)
|
||||||
|
|
||||||
2007-09-08 Matthias Clasen <mclasen@redhat.com>
|
2007-09-08 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkentrycompletion.c:
|
* gtk/gtkentrycompletion.c:
|
||||||
|
@ -6707,7 +6707,6 @@ draw_insertion_cursor (GtkWidget *widget,
|
|||||||
gint i;
|
gint i;
|
||||||
gfloat cursor_aspect_ratio;
|
gfloat cursor_aspect_ratio;
|
||||||
gint offset;
|
gint offset;
|
||||||
gint window_width;
|
|
||||||
|
|
||||||
/* When changing the shape or size of the cursor here,
|
/* When changing the shape or size of the cursor here,
|
||||||
* propagate the changes to gtktextview.c:text_window_invalidate_cursors().
|
* propagate the changes to gtktextview.c:text_window_invalidate_cursors().
|
||||||
@ -6724,13 +6723,6 @@ draw_insertion_cursor (GtkWidget *widget,
|
|||||||
else
|
else
|
||||||
offset = stem_width - stem_width / 2;
|
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++)
|
for (i = 0; i < stem_width; i++)
|
||||||
gdk_draw_line (drawable, gc,
|
gdk_draw_line (drawable, gc,
|
||||||
location->x + i - offset, location->y,
|
location->x + i - offset, location->y,
|
||||||
|
Loading…
Reference in New Issue
Block a user