当前位置: 首页>>代码示例>>Python>>正文


Python StandardWindow.focus_highlight_animate方法代码示例

本文整理汇总了Python中efl.elementary.window.StandardWindow.focus_highlight_animate方法的典型用法代码示例。如果您正苦于以下问题:Python StandardWindow.focus_highlight_animate方法的具体用法?Python StandardWindow.focus_highlight_animate怎么用?Python StandardWindow.focus_highlight_animate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在efl.elementary.window.StandardWindow的用法示例。


在下文中一共展示了StandardWindow.focus_highlight_animate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: focus5_clicked

# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import focus_highlight_animate [as 别名]
def focus5_clicked(obj, item=None):

    theme_overlay_add(os.path.join(script_path, "test_focus_custom.edj"))

    win = StandardWindow("focus5", "Focus Custom", autodel=True, size=(320, 320))
    win.focus_highlight_enabled = True
    win.focus_highlight_animate = True
    win.focus_highlight_style = "glow"

    fr = Frame(win, style="pad_large",
              size_hint_weight=EXPAND_BOTH);
    win.resize_object_add(fr)
    fr.show()

    bx = Box(fr)
    fr.content = bx
    bx.show()

    chk = Check(bx, text='Enable glow effect on "Glow" Button', state=True,
                size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
    bx.pack_end(chk)
    chk.show()

    spinner = Spinner(bx, size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
    bx.pack_end(spinner)
    spinner.show()

    bt = Button(bx, text="Glow Button",
                size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
    bt.callback_focused_add(_glow_effect_on_cb, win, chk)
    bt.callback_unfocused_add(_glow_effect_off_cb, win, chk)
    bx.pack_end(bt)
    bt.show()

    sp = Separator(bx, horizontal=True,
                   size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
    bx.pack_end(sp)
    sp.show()

    bx2 = Box(bx, horizontal=True,
              size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
    bx.pack_end(bx2)
    bx2.show()

    for i in range (1, 5):
        bt = Button(bx2, text="Button %d" % i,
                    size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
        bx2.pack_end(bt)
        bt.show()

    win.show()
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:53,代码来源:test_focus.py

示例2: focus4_clicked

# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import focus_highlight_animate [as 别名]
def focus4_clicked(obj, item=None):
    win = StandardWindow("focus4", "Focus 4", autodel=True, size=(320, 320))

    win.focus_highlight_enabled = True
    win.focus_highlight_animate = True

    fr = Frame(win, style="pad_large",
              size_hint_weight=EXPAND_BOTH);
    win.resize_object_add(fr)
    fr.show()

    # First Example - Using Focus Highlight
    bx = Box(fr)
    fr.content = bx
    bx.show()

    tg = Check(bx, text="Focus Highlight Enabled (Config)", state=True,
               size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
    tg.callback_changed_add(_highlight_enabled_cb, win)

    bx.pack_end(tg)
    tg.show()

    tg = Check(bx, text="Focus Highlight Animate (Config)", state=True,
               size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
    tg.callback_changed_add(_highlight_animate_cb, win)
    bx.pack_end(tg)
    tg.show()

    tg = Check(bx, text="Focus Highlight Enabled (Win)", state=True,
               size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
    tg.callback_changed_add(_win_highlight_enabled_cb, win)
    bx.pack_end(tg)
    tg.show()

    tg = Check(bx, text="Focus Highlight Animate (Win)", state=True,
               size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
    tg.callback_changed_add(_win_highlight_animate_cb, win)
    bx.pack_end(tg)
    tg.show()

    sp = Separator(win, horizontal=True,
                   size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
    bx.pack_end(sp)
    sp.show()

    # Second Example - Using Custom Chain
    lb = Label(bx, text="Custom Chain: Please use tab key to check",
               size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
    bx.pack_end(lb)
    lb.show()

    bx2 = Box(bx, horizontal=True,
              size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
    bx.pack_end(bx2)
    bx2.show()

    bt1 = Button(bx2, text="Button 1",
                 size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
    bx2.pack_end(bt1)
    bt1.show()
    
    bt2 = Button(bx2, text="Button 2",
                 size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
    bx2.pack_end(bt2)
    bt2.show()
    
    bt3 = Button(bx2, text="Button 3",
                 size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
    bx2.pack_end(bt3)
    bt3.show()
    
    bt4 = Button(bx2, text="Button 4",
                 size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
    bx2.pack_end(bt4)
    bt4.show()

    bx2.focus_custom_chain = [bt2, bt1, bt4, bt3]
   
    tg = Check(bx, text="Custom Chain", state=False, 
               size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
    tg.callback_changed_add(_custom_chain_cb, bx)
    bx.pack_end(tg)
    tg.show()
   

    win.show()
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:89,代码来源:test_focus.py


注:本文中的efl.elementary.window.StandardWindow.focus_highlight_animate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。