- if (GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->draw)
- GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->draw (widget, cr);
+ get_padding_and_border (widget, &border);
+
+ GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->get_preferred_height (widget,
+ minimum_height,
+ natural_height);
+
+ if (minimum_height)
+ *minimum_height += border.top + border.bottom;
+ if (natural_height)
+ *natural_height += border.top + border.bottom;
+}
+
+static gboolean
+gtk_info_bar_draw (GtkWidget *widget,
+ cairo_t *cr)
+{
+ GtkStyleContext *context;
+
+ context = gtk_widget_get_style_context (widget);
+
+ gtk_render_background (context, cr, 0, 0,
+ gtk_widget_get_allocated_width (widget),
+ gtk_widget_get_allocated_height (widget));
+ gtk_render_frame (context, cr, 0, 0,
+ gtk_widget_get_allocated_width (widget),
+ gtk_widget_get_allocated_height (widget));
+
+ GTK_WIDGET_CLASS (gtk_info_bar_parent_class)->draw (widget, cr);