+static void
+get_padding_and_border (GtkFrame *frame,
+ GtkBorder *border)
+{
+ GtkStyleContext *context;
+ GtkStateFlags state;
+
+ context = gtk_widget_get_style_context (GTK_WIDGET (frame));
+ state = gtk_widget_get_state_flags (GTK_WIDGET (frame));
+
+ gtk_style_context_get_padding (context, state, border);
+
+ if (frame->priv->shadow_type != GTK_SHADOW_NONE)
+ {
+ GtkBorder tmp;
+
+ gtk_style_context_get_border (context, state, &tmp);
+ border->top += tmp.top;
+ border->right += tmp.right;
+ border->bottom += tmp.bottom;
+ border->left += tmp.left;
+ }
+}
+