[gtk+] entry: allocate the CSS borders to GtkEntry



commit 5b2c1ee828b456bdecc3f5eeac9c0598e4962b39
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Jan 30 13:59:22 2012 -0500

    entry: allocate the CSS borders to GtkEntry
    
    Every widget should allocate its borders. Make this true for GtkEntry.

 gtk/gtkentry.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index a69fc23..9f9a6cc 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3033,13 +3033,14 @@ _gtk_entry_get_borders (GtkEntry *entry,
   if (priv->has_frame)
     {
       GtkStyleContext *context;
-      GtkBorder padding;
+      GtkBorder padding, border;
 
       context = gtk_widget_get_style_context (widget);
       gtk_style_context_get_padding (context, 0, &padding);
+      gtk_style_context_get_border (context, 0, &border);
 
-      *xborder = padding.left;
-      *yborder = padding.top;
+      *xborder = padding.left + border.left;
+      *yborder = padding.top + border.top;
     }
   else
     {



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