本文整理汇总了Python中sugar3.graphics.icon.Icon.set_sensitive方法的典型用法代码示例。如果您正苦于以下问题:Python Icon.set_sensitive方法的具体用法?Python Icon.set_sensitive怎么用?Python Icon.set_sensitive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sugar3.graphics.icon.Icon
的用法示例。
在下文中一共展示了Icon.set_sensitive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_icon_widgets
# 需要导入模块: from sugar3.graphics.icon import Icon [as 别名]
# 或者: from sugar3.graphics.icon.Icon import set_sensitive [as 别名]
def create_icon_widgets(box, sensitive=True):
icon = Icon(icon_name='go-previous')
icon.props.icon_size = Gtk.IconSize.LARGE_TOOLBAR
box.pack_start(icon, True, True, 0)
icon.set_sensitive(sensitive)
icon.show()
icon = Icon(icon_name='computer-xo',
icon_size=Gtk.IconSize.LARGE_TOOLBAR,
xo_color=XoColor())
box.pack_start(icon, True, True, 0)
icon.set_sensitive(sensitive)
icon.show()
icon = Icon(icon_name='battery-000',
icon_size=Gtk.IconSize.LARGE_TOOLBAR,
badge_name='emblem-busy')
box.pack_start(icon, True, True, 0)
icon.set_sensitive(sensitive)
icon.show()
icon = Icon(icon_name='gtk-new',
icon_size=Gtk.IconSize.LARGE_TOOLBAR,
badge_name='gtk-cancel')
box.pack_start(icon, True, True, 0)
icon.set_sensitive(sensitive)
icon.show()
示例2: create_icon_widgets
# 需要导入模块: from sugar3.graphics.icon import Icon [as 别名]
# 或者: from sugar3.graphics.icon.Icon import set_sensitive [as 别名]
def create_icon_widgets(box, sensitive=True):
icon = Icon(icon_name='go-previous')
icon.props.pixel_size = style.STANDARD_ICON_SIZE
box.pack_start(icon, True, True, 0)
icon.set_sensitive(sensitive)
icon.show()
icon = Icon(icon_name='computer-xo',
pixel_size=style.STANDARD_ICON_SIZE,
xo_color=XoColor())
box.pack_start(icon, True, True, 0)
icon.set_sensitive(sensitive)
icon.show()
icon = Icon(icon_name='battery-000',
pixel_size=style.STANDARD_ICON_SIZE,
badge_name='emblem-busy')
box.pack_start(icon, True, True, 0)
icon.set_sensitive(sensitive)
icon.show()
icon = Icon(icon_name='gtk-new',
pixel_size=style.STANDARD_ICON_SIZE,
badge_name='gtk-cancel')
box.pack_start(icon, True, True, 0)
icon.set_sensitive(sensitive)
icon.show()