[gimp] app: fix wilber dawing offset on widgets that don't have a window
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix wilber dawing offset on widgets that don't have a window
- Date: Tue, 1 Mar 2011 16:11:45 +0000 (UTC)
commit 0bb5a76405de0d9638c44b025729b32426c907bb
Author: Michael Natterer <mitch gimp org>
Date: Tue Mar 1 17:11:22 2011 +0100
app: fix wilber dawing offset on widgets that don't have a window
app/widgets/gimpcairo.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpcairo.c b/app/widgets/gimpcairo.c
index 17a8e9f..7e4e67c 100644
--- a/app/widgets/gimpcairo.c
+++ b/app/widgets/gimpcairo.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]