diff -r de35eae9048a Lib/idlelib/ZoomInOut.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lib/idlelib/ZoomInOut.py Sun Apr 28 18:46:02 2013 +0200 @@ -0,0 +1,36 @@ +# ZoomInOut extension +# Press to zoom in and to zoom out + + +def zoom_decorator(func): + """ + Decotaror to avoid code duplication in + zoom_in_event and zoom_out_event + """ + def f(self, event): + font = self.text.configure('font') + fontname, fontsize, fontwidth = font[-1] + fontsize = func(self, fontsize) + self.text.configure(font=(fontname, fontsize, fontwidth)) + return f + + +class ZoomInOut: + + menudefs = [ + ('windows', [ + ('Zoom In', '<>'), + ('Zoom Out', '<>') + ]) + ] + + def __init__(self, editwin): + self.text = editwin.text + + @zoom_decorator + def zoom_in_event(self, fontsize): + return int(fontsize) + 1 + + @zoom_decorator + def zoom_out_event(self, fontsize): + return int(fontsize) - 1 diff -r de35eae9048a Lib/idlelib/config-extensions.def --- a/Lib/idlelib/config-extensions.def Wed Apr 24 23:33:20 2013 +0200 +++ b/Lib/idlelib/config-extensions.def Sun Apr 28 18:46:02 2013 +0200 @@ -44,6 +44,12 @@ [ZoomHeight_cfgBindings] zoom-height= +[ZoomInOut] +enable=1 +[ZoomInOut_cfgBindings] +zoom-in= +zoom-out= + [ScriptBinding] enable=1 enable_shell=0 diff -r de35eae9048a Misc/ACKS --- a/Misc/ACKS Wed Apr 24 23:33:20 2013 +0200 +++ b/Misc/ACKS Sun Apr 28 18:46:02 2013 +0200 @@ -1386,3 +1386,4 @@ Kai Zhu Tarek Ziadé Peter Åstrand +Alejandro Rodas

AltStyle によって変換されたページ (->オリジナル) /