test_icons.py 747 B

1234567891011121314151617181920212223242526272829303132
  1. # -*- coding: utf-8 -*-
  2. from appuifw import *
  3. from graphics import *
  4. import e32
  5. MIFFILE = u"e:\\python\\milkshake.mif"
  6. icons = [ Icon(MIFFILE,0,0),
  7. Icon(MIFFILE,2,2),
  8. Icon(MIFFILE,4,4),
  9. Icon(MIFFILE,6,6),
  10. Icon(MIFFILE,8,8),
  11. Icon(MIFFILE,10,10),
  12. Icon(MIFFILE,12,12),
  13. Icon(MIFFILE,14,14),
  14. Icon(MIFFILE,16,16),
  15. Icon(MIFFILE,18,18),
  16. Icon(MIFFILE,20,20)]
  17. labels = [ u"0%", u"10%", u"20%", u"30%", u"40%", u"50%",
  18. u"60%", u"70%", u"80%", u"90%", u"100%" ]
  19. items = map(lambda a,b: (a,u"",b), labels, icons)
  20. lock = e32.Ao_lock()
  21. def close_app():
  22. lock.signal()
  23. app.body = Listbox(items, lambda: None)
  24. lock.wait()