diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-10-25 12:09:42 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-10-25 12:09:42 (GMT) |
commit | 8d5543a256a30df6eccefd1d3cf823b26b281600 (patch) | |
tree | a6a4454b4cd46dc58d2ca58da031d897f8350485 /Area.py | |
parent | 13c69be0bf904701cbad9c5f9584ba4ffdb298b1 (diff) |
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 <gonzalo@laptop.org>
Diffstat (limited to 'Area.py')
-rw-r--r-- | Area.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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']) |