[gtk+/wip/baedert/drawing: 338/396] textview: Use correct size for cairo node bounds
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 338/396] textview: Use correct size for cairo node bounds
- Date: Wed, 19 Jul 2017 11:38:48 +0000 (UTC)
commit 72a6eb39a2f005602247c58e3ec34576724d642b
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]