[gtk+] Fix gtkmisc padding calculation



commit 31e89b44da1662d46f42e0f04bc3bf18d9876c1c
Author: Paolo Borelli <pborelli gnome org>
Date:   Mon Jan 23 20:56:55 2012 +0100

    Fix gtkmisc padding calculation
    
    Actually sum css padding and gtkmisc padding as intended in the previous
    patch.

 gtk/gtkmisc.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkmisc.c b/gtk/gtkmisc.c
index d7b49ee..5274932 100644
--- a/gtk/gtkmisc.c
+++ b/gtk/gtkmisc.c
@@ -425,9 +425,10 @@ _gtk_misc_get_padding_and_border (GtkMisc   *misc,
   gtk_style_context_get_padding (context, state, border);
 
   gtk_misc_get_padding (misc, &xpad, &ypad);
-
-  border->right = border->left = xpad;
-  border->top = border->bottom = xpad;
+  border->top += ypad;
+  border->left += xpad;
+  border->bottom += ypad;
+  border->right += xpad;
 
   gtk_style_context_get_border (context, state, &tmp);
   border->top += tmp.top;



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