widget: Don't do a 0-size check before snapshotting

Even widgets with an empty allocation may still want to draw stuff.
Examples include shadows or child widgets with negative margins.

Fixes GtkEntry's progressbar not showing up anymore.
This commit is contained in:
Benjamin Otte 2018-04-08 20:09:45 +02:00
parent 8d8db89669
commit e8fef1147f

View File

@ -13336,8 +13336,7 @@ gtk_widget_create_render_node (GtkWidget *widget,
/* Offset to content allocation */ /* Offset to content allocation */
gtk_snapshot_offset (snapshot, margin.left + padding.left + border.left, margin.top + border.top + padding.top); gtk_snapshot_offset (snapshot, margin.left + padding.left + border.left, margin.top + border.top + padding.top);
if (gtk_widget_get_width (widget) > 0 && gtk_widget_get_height (widget) > 0) klass->snapshot (widget, snapshot);
klass->snapshot (widget, snapshot);
gtk_snapshot_offset (snapshot, - (padding.left + border.left), -(border.top + padding.top)); gtk_snapshot_offset (snapshot, - (padding.left + border.left), -(border.top + padding.top));
gtk_css_style_snapshot_outline (style, gtk_css_style_snapshot_outline (style,