add line_height config variable

This commit is contained in:
Matt Rose 2020-06-10 22:48:43 -04:00
parent 9d5c2a6bb3
commit b1d502e939
2 changed files with 4 additions and 0 deletions

View File

@ -233,6 +233,7 @@ DEFAULTS = {
'use_system_font' : True, 'use_system_font' : True,
'use_theme_colors' : False, 'use_theme_colors' : False,
'bold_is_bright' : False, 'bold_is_bright' : False,
'line_height' : 1.0,
'encoding' : 'UTF-8', 'encoding' : 'UTF-8',
'active_encodings' : ['UTF-8', 'ISO-8859-1'], 'active_encodings' : ['UTF-8', 'ISO-8859-1'],
'focus_on_close' : 'auto', 'focus_on_close' : 'auto',

View File

@ -693,6 +693,8 @@ class Terminal(Gtk.VBox):
except: except:
pass pass
self.vte.set_allow_bold(self.config['allow_bold']) self.vte.set_allow_bold(self.config['allow_bold'])
if hasattr(self.vte,'set_cell_height_scale'):
self.vte.set_cell_height_scale(self.config['line_height'])
if hasattr(self.vte, 'set_bold_is_bright'): if hasattr(self.vte, 'set_bold_is_bright'):
self.vte.set_bold_is_bright(self.config['bold_is_bright']) self.vte.set_bold_is_bright(self.config['bold_is_bright'])
@ -812,6 +814,7 @@ class Terminal(Gtk.VBox):
elif self.config['scrollbar_position'] == 'right': elif self.config['scrollbar_position'] == 'right':
self.terminalbox.reorder_child(self.vte, 0) self.terminalbox.reorder_child(self.vte, 0)
self.vte.set_rewrap_on_resize(self.config['rewrap_on_resize']) self.vte.set_rewrap_on_resize(self.config['rewrap_on_resize'])
self.titlebar.update() self.titlebar.update()