From 8d5543a256a30df6eccefd1d3cf823b26b281600 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Thu, 25 Oct 2012 12:09:42 +0000 Subject: Resize the textview area when change font - SL #4078 This patch also solves a problem when close the activity while a text is being edited. Signed-off-by: Gonzalo Odiard --- (limited to 'Area.py') diff --git a/Area.py b/Area.py index f5d62e5..da55e36 100644 --- a/Area.py +++ b/Area.py @@ -225,6 +225,9 @@ class Area(Gtk.DrawingArea): self._font_description = fd self.activity.textview.modify_font(fd) self.tool['font_description'] = fd.to_string() + if self.text_in_progress: + # set the focus in the textview to enable resize if needed + GObject.idle_add(self.activity.textview.grab_focus) def get_font_description(self): return Pango.FontDescription(self.tool['font_description']) -- cgit v0.9.1