forked from AuroraMiddleware/gtk
widget: Fix snapshot condition
Of course, we only need to snapshot if both width and height > 0, otherwise the result is invisible.
This commit is contained in:
parent
60acbd1090
commit
66d5a4f752
@ -13902,7 +13902,7 @@ gtk_widget_snapshot (GtkWidget *widget,
|
||||
|
||||
/* Offset to content allocation */
|
||||
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)
|
||||
if (gtk_widget_get_width (widget) > 0 && gtk_widget_get_height (widget) > 0)
|
||||
klass->snapshot (widget, snapshot);
|
||||
gtk_snapshot_offset (snapshot, - (margin.left + padding.left + border.left), -(margin.top + border.top + padding.top));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user