diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index d24f4f50..b4ceaa4b 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -313,6 +313,13 @@ 1 2 + + 1.0 + 2.0 + 1.0 + 0.1 + 0.2 + 100 1 @@ -904,6 +911,53 @@ 1 + + + True + False + Line Height: + 0 + + + 0 + 4 + + + + + 100 + True + True + baseline + True + adjustment_lineheight + 1 + 1 + False + bottom + + + + 2 + 4 + + + + + True + False + 1.0 + right + 5 + 5 + 1 + 1 + + + 1 + 4 + + 100 diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index cddc09f3..101c357a 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -240,6 +240,13 @@ class PrefsEditor: widget.set_value(float(termsepsize)) widget = guiget('handlesize_value_label') widget.set_text(str(termsepsize)) + # Line Height + lineheightsize = self.config['line_height'] + lineheightsize = round(float(lineheightsize),1) + widget = guiget('lineheight') + widget.set_value(lineheightsize) + widget = guiget('lineheight_value_label') + widget.set_text(str(lineheightsize)) # Window geometry hints geomhint = self.config['geometry_hinting'] widget = guiget('wingeomcheck') @@ -1100,6 +1107,18 @@ class PrefsEditor: label_widget = guiget('handlesize_value_label') label_widget.set_text(str(value)) + def on_lineheight_value_changed(self, widget): + """Handles line height changed""" + value = widget.get_value() + value = round(float(value), 1) + if value > 2.0: + value = 2.0 + self.config['line_height'] = value + self.config.save() + guiget = self.builder.get_object + label_widget = guiget('lineheight_value_label') + label_widget.set_text(str(value)) + def on_focuscombo_changed(self, widget): """Focus type changed""" selected = widget.get_active()