app: fix wilber dawing offset on widgets that don't have a window

This commit is contained in:
Michael Natterer 2011-03-01 17:11:22 +01:00
parent ebe4b4102f
commit 0bb5a76405
1 changed files with 6 additions and 0 deletions

View File

@ -159,6 +159,9 @@ gimp_cairo_draw_toolbox_wilber (GtkWidget *widget,
factor = allocation.width / wilber_width * 0.9;
if (! gtk_widget_get_has_window (widget))
cairo_translate (cr, allocation.x, allocation.y);
cairo_scale (cr, factor, factor);
gimp_cairo_wilber (cr,
@ -208,6 +211,9 @@ gimp_cairo_draw_drop_wilber (GtkWidget *widget,
factor = MIN (width / wilber_width, height / wilber_height);
if (! gtk_widget_get_has_window (widget))
cairo_translate (cr, allocation.x, allocation.y);
cairo_scale (cr, factor, factor);
/* magic factors depend on the image used, everything else is generic