MCPcopy Index your code
hub / github.com/python/cpython / ResetFont

Method ResetFont

Lib/idlelib/editor.py:832–847  ·  view source on GitHub ↗

Update the text widgets' font if it is changed

(self)

Source from the content-addressed store, hash-verified

830 self.text['insertofftime'] = idleConf.blink_off_time
831
832 def ResetFont(self):
833 "Update the text widgets' font if it is changed"
834 # Called from configdialog.py
835
836 # Update the code context widget first, since its height affects
837 # the height of the text widget. This avoids double re-rendering.
838 if self.code_context is not None:
839 self.code_context.update_font()
840 # Next, update the line numbers widget, since its width affects
841 # the width of the text widget.
842 if self.line_numbers is not None:
843 self.line_numbers.update_font()
844 # Finally, update the main text widget.
845 new_font = idleConf.GetFont(self.root, 'main', 'EditorWindow')
846 self.text['font'] = new_font
847 self.set_width()
848
849 def RemoveKeybindings(self):
850 """Remove the virtual, configurable keybindings.

Callers

nothing calls this directly

Calls 3

set_widthMethod · 0.95
GetFontMethod · 0.80
update_fontMethod · 0.45

Tested by

no test coverage detected