[gtk] widget: Don't do a 0-size check before snapshotting
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] widget: Don't do a 0-size check before snapshotting
- Date: Sun, 8 Apr 2018 23:03:17 +0000 (UTC)
commit e8fef1147f5113672dc8c4eb3be649421def21d9
Author: Benjamin Otte <otte redhat com>
Date: Sun Apr 8 20:09:45 2018 +0200
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.
gtk/gtkwidget.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 3fa0ee6cdc..99216c6904 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13336,8 +13336,7 @@ gtk_widget_create_render_node (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)
- klass->snapshot (widget, snapshot);
+ klass->snapshot (widget, snapshot);
gtk_snapshot_offset (snapshot, - (padding.left + border.left), -(border.top + padding.top));
gtk_css_style_snapshot_outline (style,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]