-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathview.py
More file actions
109 lines (104 loc) · 4.25 KB
/
view.py
File metadata and controls
109 lines (104 loc) · 4.25 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
from trame.widgets import html
from trame.widgets import vuetify3 as v3
def create_size_menu(name, config):
with v3.VBtn(
icon=True,
density="compact",
variant="plain",
classes="mx-1",
size="small",
):
v3.VIcon(
"mdi-arrow-expand",
size="x-small",
style="transform: scale(-1, 1);",
)
with v3.VMenu(activator="parent"):
with config.provide_as("config"):
with v3.VList(density="compact"):
v3.VListItem(
subtitle="Full Screen",
click=f"active_layout = '{name}'",
)
v3.VDivider()
with v3.VListItem(
subtitle="Line Break",
click="config.break_row = !config.break_row",
):
with v3.Template(v_slot_append=True):
v3.VSwitch(
v_model="config.break_row",
hide_details=True,
density="compact",
color="primary",
)
with v3.VListItem(subtitle="Offset"):
v3.VBtn(
"0",
classes="text-none ml-2",
size="small",
variant="outined",
click="config.offset = 0",
active=("config.offset === 0",),
)
v3.VBtn(
"1",
classes="text-none ml-2",
size="small",
variant="outined",
click="config.offset = 1",
active=("config.offset === 1",),
)
v3.VBtn(
"2",
classes="text-none ml-2",
size="small",
variant="outined",
click="config.offset = 2",
active=("config.offset === 2",),
)
v3.VBtn(
"3",
classes="text-none ml-2",
size="small",
variant="outined",
click="config.offset = 3",
active=("config.offset === 3",),
)
v3.VBtn(
"4",
classes="text-none ml-2",
size="small",
variant="outined",
click="config.offset = 4",
active=("config.offset === 4",),
)
v3.VBtn(
"5",
classes="text-none ml-2",
size="small",
variant="outined",
click="config.offset = 5",
active=("config.offset === 5",),
)
v3.VDivider()
v3.VListItem(
subtitle="Full width",
click="active_layout = 'auto_layout';config.size = 12",
)
v3.VListItem(
subtitle="1/2 width",
click="active_layout = 'auto_layout';config.size = 6",
)
v3.VListItem(
subtitle="1/3 width",
click="active_layout = 'auto_layout';config.size = 4",
)
v3.VListItem(
subtitle="1/4 width",
click="active_layout = 'auto_layout';config.size = 3",
)
v3.VListItem(
subtitle="1/6 width",
click="active_layout = 'auto_layout';config.size = 2",
)