summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-10-27 03:22:03 +0200
committerBenjamin Otte <otte@redhat.com>2012-10-31 11:09:12 +0100
commit2e287576b4c197350908251b99e08cdc4b6840e7 (patch)
tree6d953eab047699bdb2b12dc4d7b16edb2d462643
parent762e2d93220e7468a117ec589f98f451b4109742 (diff)
downloadgtk+-2e287576b4c197350908251b99e08cdc4b6840e7.tar.gz
themingbackground: Remove struct members
... and put them in the only function they are used in.
-rw-r--r--gtk/gtkthemingbackground.c13
-rw-r--r--gtk/gtkthemingbackgroundprivate.h2
2 files changed, 7 insertions, 8 deletions
diff --git a/gtk/gtkthemingbackground.c b/gtk/gtkthemingbackground.c
index 53f9fb9105..579d2be4de 100644
--- a/gtk/gtkthemingbackground.c
+++ b/gtk/gtkthemingbackground.c
@@ -276,9 +276,10 @@ static void
_gtk_theming_background_init_context (GtkThemingBackground *bg)
{
GtkStateFlags flags = gtk_style_context_get_state (bg->context);
+ GtkBorder border, padding;
- gtk_style_context_get_border (bg->context, flags, &bg->border);
- gtk_style_context_get_padding (bg->context, flags, &bg->padding);
+ gtk_style_context_get_border (bg->context, flags, &border);
+ gtk_style_context_get_padding (bg->context, flags, &padding);
gtk_style_context_get_background_color (bg->context, flags, &bg->bg_color);
/* In the CSS box model, by default the background positioning area is
@@ -294,13 +295,13 @@ _gtk_theming_background_init_context (GtkThemingBackground *bg)
bg->padding_box = bg->border_box;
_gtk_rounded_box_shrink (&bg->padding_box,
- bg->border.top, bg->border.right,
- bg->border.bottom, bg->border.left);
+ border.top, border.right,
+ border.bottom, border.left);
bg->content_box = bg->padding_box;
_gtk_rounded_box_shrink (&bg->content_box,
- bg->padding.top, bg->padding.right,
- bg->padding.bottom, bg->padding.left);
+ padding.top, padding.right,
+ padding.bottom, padding.left);
}
void
diff --git a/gtk/gtkthemingbackgroundprivate.h b/gtk/gtkthemingbackgroundprivate.h
index 04ecd6afce..23fe092157 100644
--- a/gtk/gtkthemingbackgroundprivate.h
+++ b/gtk/gtkthemingbackgroundprivate.h
@@ -40,8 +40,6 @@ struct _GtkThemingBackground {
GtkRoundedBox content_box;
GtkJunctionSides junction;
- GtkBorder border;
- GtkBorder padding;
GdkRGBA bg_color;
};