File: theme.py

package info (click to toggle)
ocempgui 0.2.8-1.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,464 kB
  • ctags: 1,849
  • sloc: python: 9,304; ansic: 6,849; makefile: 179
file content (20 lines) | stat: -rw-r--r-- 419 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Theme usage example.
from ocempgui.widgets import base, Renderer, Button, Label

# Load the theme.
base.GlobalStyle.load ("theme_example.rc")

# Create screen.
re = Renderer ()
re.create_screen (200, 100)
re.title = "Theme example"
re.color = (250, 250, 250)

# Create widgets.
button = Button ("Button")
button.topleft = 5, 5
label = Label ("Label")
label.topleft = 100, 5

re.add_widget (button, label)
re.start ()