diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2011-12-20 12:28:47 +0100 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-12-20 19:01:38 +0100 |
commit | fe59c5f954caf07dba480c87b041d6a731ad0709 (patch) | |
tree | b7f5d39dfb8996d772ca99b2c8fedce96db33bbe /gtk/gtkbutton.c | |
parent | 9635759548d3999f23dd02090394fe4dd640f4b6 (diff) | |
download | gtk+-fe59c5f954caf07dba480c87b041d6a731ad0709.tar.gz |
button: add a border param to gtk_button_get_props()
We'll use it later to compute the child offsets.
https://bugzilla.gnome.org/show_bug.cgi?id=666600
Diffstat (limited to 'gtk/gtkbutton.c')
-rw-r--r-- | gtk/gtkbutton.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 080cbb7cd7..1e1ee17c11 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -1402,6 +1402,7 @@ gtk_button_get_props (GtkButton *button, GtkBorder *default_outside_border, GtkBorder *inner_border, GtkBorder *padding, + GtkBorder *border, gboolean *interior_focus) { GtkStyleContext *context; @@ -1465,6 +1466,9 @@ gtk_button_get_props (GtkButton *button, if (padding) gtk_style_context_get_padding (context, state, padding); + + if (border) + gtk_style_context_get_border (context, state, border); } static void @@ -1484,7 +1488,7 @@ gtk_button_size_allocate (GtkWidget *widget, context = gtk_widget_get_style_context (widget); - gtk_button_get_props (button, &default_border, NULL, &inner_border, &padding, NULL); + gtk_button_get_props (button, &default_border, NULL, &inner_border, &padding, NULL, NULL); gtk_style_context_get_style (context, "focus-line-width", &focus_width, "focus-padding", &focus_pad, @@ -1577,7 +1581,7 @@ _gtk_button_paint (GtkButton *button, gtk_style_context_save (context); - gtk_button_get_props (button, &default_border, &default_outside_border, NULL, NULL, &interior_focus); + gtk_button_get_props (button, &default_border, &default_outside_border, NULL, NULL, NULL, &interior_focus); gtk_style_context_get_style (context, "focus-line-width", &focus_width, "focus-padding", &focus_pad, @@ -1932,7 +1936,7 @@ gtk_button_get_size (GtkWidget *widget, context = gtk_widget_get_style_context (widget); - gtk_button_get_props (button, &default_border, NULL, &inner_border, &padding, NULL); + gtk_button_get_props (button, &default_border, NULL, &inner_border, &padding, NULL, NULL); gtk_style_context_get_style (context, "focus-line-width", &focus_width, "focus-padding", &focus_pad, |