[gtk+] button: add a border param to gtk_button_get_props()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] button: add a border param to gtk_button_get_props()
- Date: Tue, 20 Dec 2011 18:09:21 +0000 (UTC)
commit fe59c5f954caf07dba480c87b041d6a731ad0709
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Dec 20 12:28:47 2011 +0100
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
gtk/gtkbutton.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 080cbb7..1e1ee17 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]