[gtk+/wip/baedert/drawing: 317/359] textview: Use correct size for cairo node bounds



commit c2c4a37fab271675abe281f02b661350b744ebad
Author: Timm Bäder <mail baedert org>
Date:   Sat Jul 1 08:47:51 2017 +0200

    textview: Use correct size for cairo node bounds

 gtk/gtktextview.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index da85d62..5c2ee26 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -5905,11 +5905,12 @@ gtk_text_view_snapshot (GtkWidget   *widget,
   GtkStyleContext *context;
   graphene_rect_t bounds;
   cairo_t *cr;
+  int width, height;
 
+  gtk_widget_get_content_size (widget, &width, &height);
   graphene_rect_init (&bounds,
                       0, 0,
-                      gtk_widget_get_allocated_width (widget),
-                      gtk_widget_get_allocated_height (widget));
+                      width, height);
 
   cr = gtk_snapshot_append_cairo (snapshot, &bounds, "GtkTextView");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]