[gtk+] spinbutton: Get rid of gdk_drawable_get_size() usage



commit f0c067063cc4532c1a3ac66f442cc083ada0e0a5
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 20 16:40:04 2010 +0200

    spinbutton: Get rid of gdk_drawable_get_size() usage

 gtk/gtkspinbutton.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index d940518..500a8ee 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -803,18 +803,17 @@ gtk_spin_button_draw (GtkWidget      *widget,
 
       if (shadow_type != GTK_SHADOW_NONE)
         {
-          gint width, height;
           GtkStateType state;
 
           state = gtk_widget_has_focus (widget) ?
             GTK_STATE_ACTIVE : gtk_widget_get_state (widget);
 
-          gdk_drawable_get_size (priv->panel, &width, &height);
-
           gtk_paint_box (gtk_widget_get_style (widget), cr,
                          state, shadow_type,
                          widget, "spinbutton",
-                         0, 0, width, height);
+                         0, 0,
+                         gdk_window_get_width (priv->panel),
+                         gdk_window_get_height (priv->panel));
         }
 
       gtk_spin_button_draw_arrow (spin, cr, GTK_ARROW_UP);



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