def setFont(font=None): """Ask and set the main application font.""" if font is None: font = widgets.selectFont() if font: GD.cfg["gui/font"] = str(font.toString()) GD.cfg["gui/fontfamily"] = str(font.family()) GD.cfg["gui/fontsize"] = font.pointSize() GD.GUI.setFont(font)
def setFont(font=None): """Set the main application font. If no font is specified, a user dialog pops up to select it. """ if font is None: font,ok = widgets.selectFont() if not ok: return GD.app.setFont(font) if GD.gui: GD.gui.update()
def setFont(): """Set the main application font from a user dialog widget.""" font,ok = widgets.selectFont() if ok: GD.app.setFont(font)