Commit 404faa7
Resize tab content
Changed files (3)
modifiedbirdfont/GtkWindow.valamodifiedlibbirdfont/GlyphCanvas.valamodifiedlibbirdfont/TabContent.vala
Diff
@@ -1190,7 +1190,6 @@ class ToolboxCanvas : DrawingArea { public class GlyphCanvasArea : DrawingArea { GlyphCanvas glyph_canvas; WidgetAllocation alloc = new WidgetAllocation ();- WidgetAllocation prev_alloc = new WidgetAllocation (); public GlyphCanvasArea (GlyphCanvas gc) { int event_flags;@@ -1214,21 +1213,12 @@ public class GlyphCanvasArea : DrawingArea { get_allocation (out allocation); alloc = new WidgetAllocation ();-+ alloc.width = allocation.width; alloc.height = allocation.height; alloc.x = allocation.x; alloc.y = allocation.y; - glyph_canvas.set_allocation (alloc);- BirdFont.current_glyph.resized (alloc);- - prev_alloc = new WidgetAllocation ();- prev_alloc.width = allocation.width;- prev_alloc.height = allocation.height;- prev_alloc.x = allocation.x;- prev_alloc.y = allocation.y;- Context cw = cairo_create (get_window()); Surface s = new Surface.similar (cw.get_target (), Cairo.Content.COLOR_ALPHA, alloc.width, alloc.height);@@ -32,7 +32,7 @@ public class GlyphCanvas : GLib.Object { return allocation; } - public void set_allocation (WidgetAllocation w) { + public static void set_allocation (WidgetAllocation w) { allocation = w.copy (); } @@ -66,6 +66,8 @@ public class TabContent : GLib.Object { cr.fill (); cr.restore (); } else {+ GlyphCanvas.set_allocation (allocation);+ BirdFont.current_glyph.resized (allocation); GlyphCanvas.current_display.draw (allocation, cr); } }