[gtk+] textview: Use correct size for cairo node bounds
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] textview: Use correct size for cairo node bounds
- Date: Thu, 20 Jul 2017 01:56:14 +0000 (UTC)
commit d832001baa3dcf03852bf1306918b54a2f9e6622
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]