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

Method var_changed_font

Lib/idlelib/configdialog.py:412–425  ·  view source on GitHub ↗

Store changes to font attributes. When one font attribute changes, save them all, as they are not independent from each other. In particular, when we are overriding the default font, we need to write out everything.

(self, *params)

Source from the content-addressed store, hash-verified

410 self.set_samples()
411
412 def var_changed_font(self, *params):
413 """Store changes to font attributes.
414
415 When one font attribute changes, save them all, as they are
416 not independent from each other. In particular, when we are
417 overriding the default font, we need to write out everything.
418 """
419 value = self.font_name.get()
420 changes.add_option('main', 'EditorWindow', 'font', value)
421 value = self.font_size.get()
422 changes.add_option('main', 'EditorWindow', 'font-size', value)
423 value = self.font_bold.get()
424 changes.add_option('main', 'EditorWindow', 'font-bold', value)
425 self.set_samples()
426
427 def on_fontlist_select(self, event):
428 """Handle selecting a font from the list.

Callers

nothing calls this directly

Calls 3

set_samplesMethod · 0.95
getMethod · 0.45
add_optionMethod · 0.45

Tested by

no test coverage detected