From 5e25a5c7ca527826e1231ee377526f67563aadd5 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 4 Sep 2008 11:10:29 +0000 Subject: [PATCH] when extending the draw rectangle by the "draw-border" style property, 2008-09-04 Michael Natterer * gtk/gtkwidget.c (gtk_widget_get_draw_rectangle): when extending the draw rectangle by the "draw-border" style property, subtract "left" from "x" and "top" from "y", not the other way around. svn path=/trunk/; revision=21285 --- ChangeLog | 6 ++++++ gtk/gtkwidget.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20f96c6c30..4fe896e4f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-04 Michael Natterer + + * gtk/gtkwidget.c (gtk_widget_get_draw_rectangle): when extending + the draw rectangle by the "draw-border" style property, subtract + "left" from "x" and "top" from "y", not the other way around. + 2008-09-03 Matthias Clasen * gdk/gdkwindow.c: diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 597ecd7410..79a0f48bb1 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -3493,13 +3493,13 @@ gtk_widget_get_draw_rectangle (GtkWidget *widget, *rect = widget->allocation; - gtk_widget_style_get (widget, + gtk_widget_style_get (widget, "draw-border", &draw_border, NULL); if (draw_border) { - rect->x -= draw_border->top; - rect->y -= draw_border->left; + rect->x -= draw_border->left; + rect->y -= draw_border->top; rect->width += draw_border->left + draw_border->right; rect->height += draw_border->top + draw_border->bottom;