From 80ff07095a6c290dee5e824f85ee362fa3cd37fa Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 2 Dec 2009 00:19:26 +0000 Subject: [PATCH] make geometry hinting a configurable option. Closes LP #487747 --- doc/terminator_config.5 | 4 ++++ terminatorlib/config.py | 1 + terminatorlib/terminatorterm.py | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/terminator_config.5 b/doc/terminator_config.5 index 4dcbe8e7..a497a043 100644 --- a/doc/terminator_config.5 +++ b/doc/terminator_config.5 @@ -95,6 +95,10 @@ Default value: \fBblock\fR Sets what type of terminal should be emulated. Default value: \fBxterm\fR .TP +.B geometry_hinting +If True the window will resize in step with font sizes, if False it will follow pixels +Default value: \fBTrue\fR +.TP .B font An Pango font name. Examples are "Sans 12" or "Monospace Bold 14". Default value: \fBMono 8\fR diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 41db77c7..7f4d55cf 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -81,6 +81,7 @@ DEFAULTS = { 'cursor_shape' : 'block', 'cursor_color' : '', 'emulation' : 'xterm', + 'geometry_hinting' : True, 'font' : 'Mono 10', 'foreground_color' : '#AAAAAA', 'scrollbar_position' : "right", diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index 87c7997b..d3537957 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -408,7 +408,7 @@ class TerminatorTerm (gtk.VBox): def on_vte_size_allocate(self, widget, allocation): dbg ('Terminal resized to %dx%d' % (self._vte.get_column_count (), self._vte.get_row_count ())) self._titlebox.set_terminal_size (self._vte.get_column_count (), self._vte.get_row_count ()) - if self._vte.window != None: + if self._vte.window != None and (self.conf.geometry_hinting): self.terminator.on_term_resized () def get_pixbuf(self, maxsize= None):