Keep a note of when we are using a custom font size, so we don't override it in reconfigure_vte. Closes #256335

This commit is contained in:
Chris Jones 2008-08-26 22:24:36 +01:00
parent 31d598bb9b
commit f020eaa32b
1 changed files with 8 additions and 4 deletions

View File

@ -44,6 +44,7 @@ class TerminatorTerm (gtk.VBox):
matches = {} matches = {}
TARGET_TYPE_VTE = 8 TARGET_TYPE_VTE = 8
_custom_font_size = None
def __init__ (self, terminator, profile = None, command = None, cwd = None): def __init__ (self, terminator, profile = None, command = None, cwd = None):
gtk.VBox.__init__ (self) gtk.VBox.__init__ (self)
@ -535,10 +536,11 @@ text/plain
self._vte.set_delete_binding (delbind) self._vte.set_delete_binding (delbind)
# Set our font # Set our font
try: if not self._custom_font_size:
self._vte.set_font (pango.FontDescription (self.conf.font)) try:
except: self._vte.set_font (pango.FontDescription (self.conf.font))
pass except:
pass
# Set our boldness # Set our boldness
self._vte.set_allow_bold (self.conf.allow_bold) self._vte.set_allow_bold (self.conf.allow_bold)
@ -766,6 +768,7 @@ text/plain
# End key events # End key events
def zoom_orig (self): def zoom_orig (self):
self._custom_font_size = None
self._vte.set_font (pango.FontDescription (self.conf.font)) self._vte.set_font (pango.FontDescription (self.conf.font))
def zoom (self, zoom_in): def zoom (self, zoom_in):
@ -778,6 +781,7 @@ text/plain
fontsize += pango.SCALE fontsize += pango.SCALE
pangodesc.set_size (fontsize) pangodesc.set_size (fontsize)
self._custom_font_size = fontsize
self._vte.set_font (pangodesc) self._vte.set_font (pangodesc)
def start_search(self): def start_search(self):