[gtk+] gtk: draw the frame around the spinbutton's buttons conditionally



commit c2fd7e8350c92002b30d957977269698b5eed74d
Author: Michael Natterer <mitch gimp org>
Date:   Fri Nov 19 14:55:47 2010 +0100

    gtk: draw the frame around the spinbutton's buttons conditionally
    
    (depending on GtkEntry::has-frame)

 gtk/gtkspinbutton.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index e791d79..a8e0f08 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -801,12 +801,13 @@ gtk_spin_button_draw (GtkWidget      *widget,
 
   gtk_cairo_transform_to_window (cr, widget, priv->panel);
 
-  gtk_paint_box (gtk_widget_get_style (widget), cr,
-                 state, shadow_type,
-                 widget, "spinbutton",
-                 0, 0,
-                 gdk_window_get_width (priv->panel),
-                 gdk_window_get_height (priv->panel));
+  if (gtk_entry_get_has_frame (GTK_ENTRY (widget)))
+    gtk_paint_box (gtk_widget_get_style (widget), cr,
+                   state, shadow_type,
+                   widget, "spinbutton",
+                   0, 0,
+                   gdk_window_get_width (priv->panel),
+                   gdk_window_get_height (priv->panel));
 
   gtk_spin_button_draw_arrow (spin, cr, GTK_ARROW_UP);
   gtk_spin_button_draw_arrow (spin, cr, GTK_ARROW_DOWN);



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