本文整理汇总了Python中preferences.Preferences.default_appearance_preferences方法的典型用法代码示例。如果您正苦于以下问题:Python Preferences.default_appearance_preferences方法的具体用法?Python Preferences.default_appearance_preferences怎么用?Python Preferences.default_appearance_preferences使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类preferences.Preferences
的用法示例。
在下文中一共展示了Preferences.default_appearance_preferences方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: confirm_and_reset_defaults
# 需要导入模块: from preferences import Preferences [as 别名]
# 或者: from preferences.Preferences import default_appearance_preferences [as 别名]
def confirm_and_reset_defaults(self, widget):
if utilityFunctions.decision_popup(self.parent, 'Reset appearance to defaults?',
'Are you sure you want to reset your appearance preferences to default values?'):
self.choices = Preferences.default_appearance_preferences()
# Visual Effects
# Set the view combo box to "Double" which is the second entry
model = self.view_box.get_model()
self.view_box.set_active_iter(model.iter_next(model.get_iter_first()))
# Set the font buttons to display the default font values
for fb, fi in zip(self.font_buttons, self.font_idents):
fb.set_font_name(self.choices[fi])
fb.emit("font_set")
# Set the color buttons to display the default color values
for cb, ci in zip(self.color_buttons, self.color_idents):
cb.set_rgba(utilityFunctions.string_to_RGBA(self.choices[ci]))