-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_framework_form.py
More file actions
executable file
·61 lines (54 loc) · 1.79 KB
/
example_framework_form.py
File metadata and controls
executable file
·61 lines (54 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env python3
from boldui.adwaita import TextButton
from boldui.app import App, widget
from boldui.framework import Row, Rectangle, SizedBox, Padding, Stack, Image, Column
@widget
def main_page():
# def greet():
# print(f'Hello, {Store["firstname"]} {Store["lastname"]}!')
# Store['firstname'] = ''
# Store['lastname'] = ''
# return Clear(
# color=0xff402020,
# child=Column([
# # Row([
# # Text(text='First Name'),
# # # TextInput(model=Store.bind('firstname')),
# # ]),
# # Row([
# # Text(text='Last Name'),
# # # TextInput(model=Store.bind('lastname')),
# # ]),
# # Row([
# # Flexible(),
# Rectangle(color=0xff222222),
# Rectangle(color=0xff999999),
# Rectangle(color=0xffdddddd),
# # Button(label='Greet', on_click=greet),
# # ]),
# ]),
# )
# Buttons
return Stack([
# Background
Rectangle(color=0xff242424),
# Image(uri='/home/david/Pictures/Wallpapers/void_4k_desktop.jpg'),
Padding(
all=17,
child=Column([
Row([
TextButton('Hello', on_mouse_down=lambda _: None),
SizedBox(child=None, width=4),
TextButton('World', on_mouse_down=lambda _: None),
]),
Row([
TextButton('Label', on_mouse_down=lambda _: None),
SizedBox(child=None, width=4),
TextButton('Foo', on_mouse_down=lambda _: None),
]),
]),
),
])
if __name__ == '__main__':
app = App(main_page)
app.run()