本文整理汇总了Python中efl.elementary.button.Button.style方法的典型用法代码示例。如果您正苦于以下问题:Python Button.style方法的具体用法?Python Button.style怎么用?Python Button.style使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.button.Button
的用法示例。
在下文中一共展示了Button.style方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: theme_clicked
# 需要导入模块: from efl.elementary.button import Button [as 别名]
# 或者: from efl.elementary.button.Button import style [as 别名]
def theme_clicked(obj, data=None):
win = StandardWindow("config", "Theme", autodel=True, size=(400,200))
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
box = Box(win)
box.size_hint_weight = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
box.show()
win.resize_object_add(box)
bt = Button(win, text = "A button with a custom style")
bt.size_hint_weight = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
bt.style = "my_custom_style"
bt.show()
box.pack_end(bt)
bt = Button(win, text = "A button with default style")
bt.size_hint_weight = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
bt.show()
box.pack_end(bt)
sep = Separator(win, horizontal=True)
sep.show()
box.pack_end(sep)
hbox = Box(win, horizontal=True)
hbox.show()
box.pack_end(hbox)
bt = Button(win, text = "Add Extension")
bt.callback_clicked_add(add_ext_clicked_cb)
bt.show()
hbox.pack_end(bt)
bt = Button(win, text = "Remove Extension")
bt.callback_clicked_add(del_ext_clicked_cb)
bt.show()
hbox.pack_end(bt)
bt = Button(win, text = "Add Overlay")
bt.callback_clicked_add(add_ovr_clicked_cb)
bt.show()
hbox.pack_end(bt)
bt = Button(win, text = "Remove Overlay")
bt.callback_clicked_add(del_ovr_clicked_cb)
bt.show()
hbox.pack_end(bt)
win.show()