diff --git a/ChangeLog b/ChangeLog index d3130bf533..ec9ff0bbe0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Jan 31 00:13:33 1998 Owen Taylor + + * gtk/gtkstyle.c: Backed out change to close polygons + since it caused problems for the Notebook. + Fri Jan 30 22:28:09 1998 Owen Taylor * gtk/gtkclist.{c,h}: diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index d3130bf533..ec9ff0bbe0 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Sat Jan 31 00:13:33 1998 Owen Taylor + + * gtk/gtkstyle.c: Backed out change to close polygons + since it caused problems for the Notebook. + Fri Jan 30 22:28:09 1998 Owen Taylor * gtk/gtkclist.{c,h}: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d3130bf533..ec9ff0bbe0 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Sat Jan 31 00:13:33 1998 Owen Taylor + + * gtk/gtkstyle.c: Backed out change to close polygons + since it caused problems for the Notebook. + Fri Jan 30 22:28:09 1998 Owen Taylor * gtk/gtkclist.{c,h}: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index d3130bf533..ec9ff0bbe0 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Sat Jan 31 00:13:33 1998 Owen Taylor + + * gtk/gtkstyle.c: Backed out change to close polygons + since it caused problems for the Notebook. + Fri Jan 30 22:28:09 1998 Owen Taylor * gtk/gtkclist.{c,h}: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index d3130bf533..ec9ff0bbe0 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Sat Jan 31 00:13:33 1998 Owen Taylor + + * gtk/gtkstyle.c: Backed out change to close polygons + since it caused problems for the Notebook. + Fri Jan 30 22:28:09 1998 Owen Taylor * gtk/gtkclist.{c,h}: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index d3130bf533..ec9ff0bbe0 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Sat Jan 31 00:13:33 1998 Owen Taylor + + * gtk/gtkstyle.c: Backed out change to close polygons + since it caused problems for the Notebook. + Fri Jan 30 22:28:09 1998 Owen Taylor * gtk/gtkclist.{c,h}: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d3130bf533..ec9ff0bbe0 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Sat Jan 31 00:13:33 1998 Owen Taylor + + * gtk/gtkstyle.c: Backed out change to close polygons + since it caused problems for the Notebook. + Fri Jan 30 22:28:09 1998 Owen Taylor * gtk/gtkclist.{c,h}: diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index c95131d722..5075891a7c 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -1186,27 +1186,19 @@ gtk_default_draw_polygon (GtkStyle *style, if (fill) gdk_draw_polygon (window, style->bg_gc[state_type], TRUE, points, npoints); - /* Check if polygon is closed */ - - if ((points[0].x == points[npoints-1].x) && - (points[0].y == points[npoints-1].y)) - npoints--; + npoints--; for (i = 0; i < npoints; i++) { - GdkPoint *next; - - next = (i == npoints-1) ? &points[0] : &points[i+1]; - - if ((points[i].x == next->x) && - (points[i].y == next->y)) + if ((points[i].x == points[i+1].x) && + (points[i].y == points[i+1].y)) { angle = 0; } else { - angle = atan2 (next->y - points[i].y, - next->x - points[i].x); + angle = atan2 (points[i+1].y - points[i].y, + points[i+1].x - points[i].x); } if ((angle > -pi_3_over_4) && (angle < pi_over_4)) @@ -1224,10 +1216,10 @@ gtk_default_draw_polygon (GtkStyle *style, gdk_draw_line (window, gc1, points[i].x-xadjust, points[i].y-yadjust, - next->x-xadjust, next->y-yadjust); + points[i+1].x-xadjust, points[i+1].y-yadjust); gdk_draw_line (window, gc3, points[i].x, points[i].y, - next->x, next->y); + points[i+1].x, points[i+1].y); } else { @@ -1244,10 +1236,10 @@ gtk_default_draw_polygon (GtkStyle *style, gdk_draw_line (window, gc4, points[i].x+xadjust, points[i].y+yadjust, - next->x+xadjust, next->y+yadjust); + points[i+1].x+xadjust, points[i+1].y+yadjust); gdk_draw_line (window, gc2, points[i].x, points[i].y, - next->x, next->y); + points[i+1].x, points[i+1].y); } } }