[gimp] app: use gtk_widget_get_allocation() instead of gdk_drawable_get_size()



commit fdde231869017b281dbc7af7343d48063527544d
Author: Michael Natterer <mitch gimp org>
Date:   Thu Mar 17 15:09:19 2011 +0100

    app: use gtk_widget_get_allocation() instead of gdk_drawable_get_size()

 app/widgets/gimpgradienteditor.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/app/widgets/gimpgradienteditor.c b/app/widgets/gimpgradienteditor.c
index c4bc24d..1f7f0a3 100644
--- a/app/widgets/gimpgradienteditor.c
+++ b/app/widgets/gimpgradienteditor.c
@@ -1185,15 +1185,15 @@ control_expose (GtkWidget          *widget,
 {
   GtkAdjustment *adj = GTK_ADJUSTMENT (editor->scroll_data);
   cairo_t       *cr  = gdk_cairo_create (gtk_widget_get_window (widget));
-  gint           width;
-  gint           height;
+  GtkAllocation  allocation;
 
-  gdk_drawable_get_size (gtk_widget_get_window (widget), &width, &height);
+  gtk_widget_get_allocation (widget, &allocation);
 
   control_draw (editor,
                 GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data),
                 cr,
-                width, height,
+                allocation.width,
+                allocation.height,
                 gtk_adjustment_get_value (adj),
                 gtk_adjustment_get_value (adj) +
                 gtk_adjustment_get_page_size (adj));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]