diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-03-01 23:28:27 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-03-01 23:28:27 +0100 |
commit | f2bfe89481217625f74224289947f7bcd839c55f (patch) | |
tree | 3765c509ea18462d4beef835db6f48ce38adb5d2 /libstorycode/gtk/gtknarrativeview.c | |
parent | 6cfd53611912442ba7f89fc5cbdb9f8c8a90c85b (diff) |
Debug narrative rendering machinery
Diffstat (limited to 'libstorycode/gtk/gtknarrativeview.c')
-rw-r--r-- | libstorycode/gtk/gtknarrativeview.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libstorycode/gtk/gtknarrativeview.c b/libstorycode/gtk/gtknarrativeview.c index 9040d55..55565d8 100644 --- a/libstorycode/gtk/gtknarrativeview.c +++ b/libstorycode/gtk/gtknarrativeview.c @@ -132,14 +132,14 @@ static gboolean resize_sig(GtkWidget *widget, GdkEventConfigure *event, e->visible_height = event->height; e->visible_width = event->width; - e->w = e->visible_width; - e->h = narrative_get_height(presentation_get_narrative(e->p)); - /* Wrap everything with the current width, to get the total height */ narrative_wrap(presentation_get_narrative(e->p), presentation_get_stylesheet(e->p), pango_language_get_default(), pc, e->w); + e->w = e->visible_width; + e->h = narrative_get_height(presentation_get_narrative(e->p)); + g_object_unref(pc); return FALSE; @@ -528,6 +528,8 @@ static gboolean draw_sig(GtkWidget *da, cairo_t *cr, GtkNarrativeView *e) cairo_fill(cr); /* Contents */ + narrative_render_cairo(presentation_get_narrative(e->p), cr, + presentation_get_stylesheet(e->p)); /* Editing overlay */ draw_overlay(cr, e); |