-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlayer.py
38 lines (36 loc) · 959 Bytes
/
layer.py
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
from castella import (
App,
show_popup,
hide_popup,
Button,
Column,
Row,
Spacer,
MultilineText,
Text,
Kind,
)
from castella.frame import Frame
App(
Frame("Demo", width=600, height=400),
Column(
Row(Spacer(), Text("Text 1")).fixed_size(300, 100),
Button("Button 1").on_click(
lambda _: show_popup(
Column(
MultilineText(
"BBBB BBB BB BBBB BBB BBBBB BB BBB",
font_size=30,
wrap=True,
kind=Kind.DANGER,
).fixed_height(200),
Button("Close").on_click(lambda _: hide_popup()).fixed_height(50),
).fixed_size(300, 250)
)
),
Row(
Button("Button 2").flex(2),
Column(Button("Button 3"), Button("Button 4")),
).fixed_height(200),
),
).run()