Elementary: Fix small issues in examples
This commit is contained in:
parent
52c60b0e08
commit
af72b465e2
|
@ -9,7 +9,8 @@ from efl.elementary.button import Button
|
||||||
from efl.elementary.calendar_elm import Calendar, \
|
from efl.elementary.calendar_elm import Calendar, \
|
||||||
ELM_DAY_MONDAY, ELM_DAY_THURSDAY, ELM_DAY_SATURDAY, \
|
ELM_DAY_MONDAY, ELM_DAY_THURSDAY, ELM_DAY_SATURDAY, \
|
||||||
ELM_CALENDAR_UNIQUE, ELM_CALENDAR_DAILY, ELM_CALENDAR_WEEKLY, \
|
ELM_CALENDAR_UNIQUE, ELM_CALENDAR_DAILY, ELM_CALENDAR_WEEKLY, \
|
||||||
ELM_CALENDAR_MONTHLY, ELM_CALENDAR_ANNUALLY
|
ELM_CALENDAR_MONTHLY, ELM_CALENDAR_ANNUALLY, \
|
||||||
|
ELM_CALENDAR_SELECT_MODE_NONE, ELM_CALENDAR_SELECT_MODE_ONDEMAND
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
|
@ -158,14 +158,14 @@ def entry_scrolled_clicked(obj, item = None):
|
||||||
|
|
||||||
# disabled entry
|
# disabled entry
|
||||||
en = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ,
|
en = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ,
|
||||||
size_hint_align=FILL_HORIZ, scrollbar_policy=SCROLL_POLICY_OFF,
|
size_hint_align=FILL_HORIZ, policy=SCROLL_POLICY_OFF,
|
||||||
text="Disabled entry", single_line=True, disabled=True)
|
text="Disabled entry", single_line=True, disabled=True)
|
||||||
en.show()
|
en.show()
|
||||||
bx.pack_end(en)
|
bx.pack_end(en)
|
||||||
|
|
||||||
# password entry
|
# password entry
|
||||||
en = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ,
|
en = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ,
|
||||||
size_hint_align=FILL_HORIZ, scrollbar_policy=SCROLL_POLICY_OFF,
|
size_hint_align=FILL_HORIZ, policy=SCROLL_POLICY_OFF,
|
||||||
password=True, single_line=True, text="Access denied, give up!",
|
password=True, single_line=True, text="Access denied, give up!",
|
||||||
disabled=True)
|
disabled=True)
|
||||||
en.show()
|
en.show()
|
||||||
|
@ -173,7 +173,7 @@ def entry_scrolled_clicked(obj, item = None):
|
||||||
|
|
||||||
# multi-line disable entry
|
# multi-line disable entry
|
||||||
en = ScrollableEntry(win, size_hint_weight=EXPAND_BOTH,
|
en = ScrollableEntry(win, size_hint_weight=EXPAND_BOTH,
|
||||||
size_hint_align=FILL_BOTH, scrollbar_policy=SCROLL_POLICY_ON,
|
size_hint_align=FILL_BOTH, policy=SCROLL_POLICY_ON,
|
||||||
disabled=True)
|
disabled=True)
|
||||||
en.context_menu_item_add("Hello")
|
en.context_menu_item_add("Hello")
|
||||||
en.context_menu_item_add("World")
|
en.context_menu_item_add("World")
|
||||||
|
@ -192,7 +192,7 @@ def entry_scrolled_clicked(obj, item = None):
|
||||||
# Single line selected entry
|
# Single line selected entry
|
||||||
en = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ,
|
en = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ,
|
||||||
size_hint_align=FILL_HORIZ, text="This is a single line",
|
size_hint_align=FILL_HORIZ, text="This is a single line",
|
||||||
scrollbar_policy=SCROLL_POLICY_OFF, single_line=True)
|
policy=SCROLL_POLICY_OFF, single_line=True)
|
||||||
en.select_all()
|
en.select_all()
|
||||||
en.show()
|
en.show()
|
||||||
bx.pack_end(en)
|
bx.pack_end(en)
|
||||||
|
@ -200,7 +200,7 @@ def entry_scrolled_clicked(obj, item = None):
|
||||||
# Filter test
|
# Filter test
|
||||||
en = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ,
|
en = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ,
|
||||||
size_hint_align=FILL_HORIZ, text="Filter test",
|
size_hint_align=FILL_HORIZ, text="Filter test",
|
||||||
scrollbar_policy=SCROLL_POLICY_OFF, single_line=True)
|
policy=SCROLL_POLICY_OFF, single_line=True)
|
||||||
en.show()
|
en.show()
|
||||||
bx.pack_end(en)
|
bx.pack_end(en)
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ def entry_scrolled_clicked(obj, item = None):
|
||||||
# en.size_hint_weight = EVAS_HINT_EXPAND, 0.0
|
# en.size_hint_weight = EVAS_HINT_EXPAND, 0.0
|
||||||
# en.size_hint_align = EVAS_HINT_FILL, 0.5
|
# en.size_hint_align = EVAS_HINT_FILL, 0.5
|
||||||
# en.text = "And now only 30 bytes"
|
# en.text = "And now only 30 bytes"
|
||||||
# en.scrollbar_policy = ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF
|
# en.policy = ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF
|
||||||
# en.single_line = True
|
# en.single_line = True
|
||||||
# en.show()
|
# en.show()
|
||||||
# bx.pack_end(en)
|
# bx.pack_end(en)
|
||||||
|
@ -264,13 +264,13 @@ def entry_scrolled_clicked(obj, item = None):
|
||||||
|
|
||||||
# Single line password entry
|
# Single line password entry
|
||||||
en_p = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ,
|
en_p = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ,
|
||||||
size_hint_align=FILL_HORIZ, scrollbar_policy=SCROLL_POLICY_OFF,
|
size_hint_align=FILL_HORIZ, policy=SCROLL_POLICY_OFF,
|
||||||
text="Password here", single_line=True, password=True)
|
text="Password here", single_line=True, password=True)
|
||||||
en_p.show()
|
en_p.show()
|
||||||
bx.pack_end(en_p)
|
bx.pack_end(en_p)
|
||||||
|
|
||||||
# entry with icon/end widgets
|
# entry with icon/end widgets
|
||||||
en = ScrollableEntry(win, scrollbar_policy=SCROLL_POLICY_OFF,
|
en = ScrollableEntry(win, policy=SCROLL_POLICY_OFF,
|
||||||
single_line=True, size_hint_weight=EXPAND_BOTH,
|
single_line=True, size_hint_weight=EXPAND_BOTH,
|
||||||
size_hint_align=FILL_BOTH, text="entry with icon and end objects")
|
size_hint_align=FILL_BOTH, text="entry with icon and end objects")
|
||||||
bt = Icon(win, standard="home", size_hint_min=(48, 48),
|
bt = Icon(win, standard="home", size_hint_min=(48, 48),
|
||||||
|
@ -286,7 +286,7 @@ def entry_scrolled_clicked(obj, item = None):
|
||||||
|
|
||||||
# markup entry
|
# markup entry
|
||||||
en = ScrollableEntry(win, size_hint_weight=EXPAND_BOTH,
|
en = ScrollableEntry(win, size_hint_weight=EXPAND_BOTH,
|
||||||
size_hint_align=FILL_BOTH, scrollbar_policy=SCROLL_POLICY_ON)
|
size_hint_align=FILL_BOTH, policy=SCROLL_POLICY_ON)
|
||||||
en.text = "This is an entry widget in this window that<br/>"\
|
en.text = "This is an entry widget in this window that<br/>"\
|
||||||
"uses markup <b>like this</> for styling and<br/>"\
|
"uses markup <b>like this</> for styling and<br/>"\
|
||||||
"formatting <em>like this</>, as well as<br/>"\
|
"formatting <em>like this</>, as well as<br/>"\
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
import os
|
||||||
from math import sin
|
from math import sin
|
||||||
|
|
||||||
from efl import elementary
|
from efl import elementary
|
||||||
|
|
|
@ -23,7 +23,7 @@ def cb_bnt_close(btn, popup):
|
||||||
popup.delete()
|
popup.delete()
|
||||||
|
|
||||||
def cb_btn_restack(btn, popup):
|
def cb_btn_restack(btn, popup):
|
||||||
im = evas.FilledImage(popup.evas);
|
im = FilledImage(popup.evas);
|
||||||
im.file = os.path.join(img_path, "mystrale_2.jpg")
|
im.file = os.path.join(img_path, "mystrale_2.jpg")
|
||||||
im.move(40, 40)
|
im.move(40, 40)
|
||||||
im.resize(500, 320)
|
im.resize(500, 320)
|
||||||
|
|
Loading…
Reference in New Issue