Add support for restoring original font size after zooming. Also import 'err' from terminatorlib
This commit is contained in:
parent
5254ede2da
commit
92b2b43e92
|
@ -103,6 +103,15 @@ Swap tab position with next Tab
|
|||
.B Ctrl+Shift+PageUp
|
||||
Swap tab position with previous Tab
|
||||
.TP
|
||||
.B Ctrl+Plus (+)
|
||||
Increase font size
|
||||
.TP
|
||||
.B Ctrl+Minus (-)
|
||||
Decrease font size
|
||||
.TP
|
||||
.B Ctrl+Equals (=)
|
||||
Restore font size to original setting
|
||||
.TP
|
||||
.B F11
|
||||
Toggle fullscreen
|
||||
.SH "Drag and Drop"
|
||||
|
|
|
@ -39,7 +39,7 @@ TARGET_TYPE_VTE = 8
|
|||
|
||||
# import our configuration loader
|
||||
from terminatorlib import config
|
||||
from terminatorlib.config import dbg
|
||||
from terminatorlib.config import dbg, err
|
||||
|
||||
#import encoding list
|
||||
from terminatorlib.encoding import TerminatorEncoding
|
||||
|
@ -611,6 +611,9 @@ text/plain
|
|||
elif keyname == 'minus':
|
||||
self.zoom (False)
|
||||
return (True)
|
||||
elif keyname == 'equal':
|
||||
self.zoom_orig ()
|
||||
return (True)
|
||||
|
||||
mask = gtk.gdk.CONTROL_MASK | gtk.gdk.SHIFT_MASK | gtk.gdk.MOD1_MASK
|
||||
if (event.state & mask) == mask:
|
||||
|
@ -690,6 +693,9 @@ text/plain
|
|||
# if you intend to use it, reinit it
|
||||
return (False)
|
||||
|
||||
def zoom_orig (self):
|
||||
self._vte.set_font (pango.FontDescription (self.conf.font))
|
||||
|
||||
def zoom (self, zoom_in):
|
||||
pangodesc = self._vte.get_font ()
|
||||
fontsize = pangodesc.get_size ()
|
||||
|
|
Loading…
Reference in New Issue