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

Method update_font

Lib/idlelib/sidebar.py:496–503  ·  view source on GitHub ↗

Update the sidebar text font, usually after config changes.

(self)

Source from the content-addressed store, hash-verified

494 return 'break'
495
496 def update_font(self):
497 """Update the sidebar text font, usually after config changes."""
498 font = idleConf.GetFont(self.text, 'main', 'EditorWindow')
499 tk_font = Font(self.text, font=font)
500 char_width = max(tk_font.measure(char) for char in ['>', '.'])
501 self.canvas.configure(width=char_width * 3 + 4)
502 self.font = font
503 self.change_callback()
504
505 def update_colors(self):
506 """Update the sidebar text colors, usually after config changes."""

Callers

nothing calls this directly

Calls 5

measureMethod · 0.95
change_callbackMethod · 0.95
FontClass · 0.90
GetFontMethod · 0.80
configureMethod · 0.45

Tested by

no test coverage detected