Advertisement
jwinterm

kivy sample color code

May 24th, 2014
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. from kivy.app import App
  2. from kivy.lang import Builder
  3. from kivy.factory import Factory
  4. from kivy.app import App
  5. from kivy.uix.widget import Widget
  6. from kivy.uix.button import Button
  7. from kivy.uix.label import Label
  8. from kivy.uix.gridlayout import GridLayout
  9. from kivy.uix.boxlayout import BoxLayout
  10. from kivy.uix.tabbedpanel import TabbedPanel
  11.  
  12. Builder.load_string('''
  13. #:kivy 1.8.0
  14.  
  15. <RootWidget>:
  16. cols: 1
  17.  
  18. Label:
  19. text: "[b]Kivy wallet[/b]"
  20. markup: True
  21. font_size: 18
  22.  
  23. BoxLayout:
  24.  
  25. Label:
  26. text: "Wallet name: "
  27. size_hint_x: 0.3
  28. font_size: 16
  29.  
  30. Label:
  31. text: root.walletname
  32. size_hint_x: 0.7
  33. color: 0,1,1
  34. font_size: 14
  35.  
  36. BoxLayout:
  37.  
  38. Label:
  39. text: "Wallet address: "
  40. size_hint_x: 0.3
  41. font_size: 16
  42.  
  43. Label:
  44. text: root.address
  45. size_hint_x: 0.7
  46. color: 0,1,1
  47. font_size: 10
  48.  
  49. BoxLayout:
  50.  
  51. Label:
  52. text: "Balance: "
  53. size_hint_x: 0.3
  54. font_size: 16
  55.  
  56. Label:
  57. text: root.balance
  58. size_hint_x: 0.7
  59. markup: True
  60. color: 0,1,1
  61. font_size: 10
  62.  
  63. BoxLayout:
  64.  
  65. Label:
  66. text: "Unlocked balance: "
  67. size_hint_x: 0.3
  68. font_size: 16
  69.  
  70. Label:
  71. text: root.unlockedbalance
  72. size_hint_x: 0.7
  73. markup: True
  74. color: 0,1,1
  75. font_size: 10
  76. ''')
  77.  
  78. class RootWidget(GridLayout):
  79. walletname, address = "uninitialized", "uninitialized"
  80. balance, unlockedbalance = "uninitialized", "uninitialized"
  81. pass
  82.  
  83.  
  84. class WalletApp(App):
  85. def build(self):
  86. return RootWidget()
  87.  
  88.  
  89. if __name__ == '__main__':
  90. WalletApp().run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement