-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanage.kv
216 lines (193 loc) · 5.29 KB
/
manage.kv
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<MergeCardSetsPopup>:
size_hint: None, None
size: dp(340), dp(200)
title: 'Merge Card Sets'
title_size: 20
auto_dismiss: False
BoxLayout:
orientation: "vertical"
GridLayout:
cols: 2
row_default_height: dp(30)
cols_minimum: {0: dp(75), 1: dp(250)}
size_hint: (None, None)
height: self.minimum_height
PopupLabelCell:
text: 'new name'
TextInput:
id: new_name
Label:
id: info_text
text_size: self.size
Label:
id: alert
color: 1, 0, 0, 1
text: ''
BoxLayout:
size_hint_y: .8
spacing: 1
padding: 1
NavbarButton:
size_hint: 1, 0.4
text: "Merge"
on_release:
root.merge()
NavbarButton:
size_hint: 1, 0.4
text: "Cancel"
on_release:
root.dismiss()
<ImportCardSetPopup>:
container: container
size_hint: None, None
size: dp(340), dp(400)
title: 'Import Card Set'
title_size: 20
auto_dismiss: False
BoxLayout:
orientation: "vertical"
ScrollView:
orientation: 'vertical'
do_scroll_x: False
size_hint_y: 6
GridLayout:
id: container
cols: 2
row_default_height: dp(30)
cols_minimum: {0: dp(75), 1: dp(250)}
size_hint: (None, None)
height: self.minimum_height
Label:
id: info_text
text_size: self.size
Label:
id: alert
color: 1, 0, 0, 1
text: ''
BoxLayout:
size_hint_y: .8
spacing: 1
padding: 1
NavbarButton:
size_hint: 1, 0.4
text: "Import"
on_release:
root.do_import()
NavbarButton:
size_hint: 1, 0.4
text: "Cancel"
on_release:
root.dismiss()
<NewCardsetPopup>:
container: container
size_hint: None, None
size: dp(340), dp(500)
title_size: 20
auto_dismiss: False
BoxLayout:
orientation: "vertical"
GridLayout:
id: container
cols: 2
row_default_height: 30
cols_minimum: {0: dp(75), 1: dp(250)}
size_hint: (None, None)
height: self.minimum_height
PopupLabelCell:
text: 'name'
TextInput:
id: edit_name
PopupLabelCell:
text: 'description'
TextInput:
id: edit_description
PopupLabelCell:
text: '*question info'
TextInput:
id: edit_qi
PopupLabelCell:
text: '*answer info'
TextInput:
id: edit_ai
Label:
text: '*Default info for new cards.'
Label:
id: alert
color: 1, 0, 0, 1
text: ''
BoxLayout:
size_hint_y: .8
spacing: 1
padding: 1
NavbarButton:
size_hint: 1, 0.4
text: "Save"
on_release:
root.save()
NavbarButton:
size_hint: 1, 0.4
text: "Cancel"
on_release:
root.dismiss()
<SelectableLabel>:
# Draw a background to indicate selection
canvas.before:
Color:
rgba: (0.29, 0.569, 0.188, 1) if self.selected else (0, 0, 0, 1)
Rectangle:
pos: self.pos
size: self.size
pos: self.pos
size: self.size
Label:
size_hint: 3, 1
id: id_label1
Label:
size_hint: 1, 1
id: id_label2
CheckBox:
id: cb_active
BoxLayout:
size_hint: 1, 1
padding: 5
Button:
text: 'View'
background_color: 0.145, 0.431, 0.369, 1.
font_size: 14
on_press: root.view_set()
<CardSetRV>:
viewclass: 'SelectableLabel'
SelectableRecycleBoxLayout:
id: rv_layout
default_size: None, dp(42)
default_size_hint: 1, None
size_hint_y: None
height: self.minimum_height
orientation: 'vertical'
multiselect: True
touch_multiselect: True
<ManageScreen>:
BoxLayout:
orientation: 'vertical'
BoxLayout:
orientation: 'horizontal'
spacing: 1
padding: 1
size_hint_y: 1
NavbarButton:
text: 'Import'
on_press: root.cardset_import()
NavbarButton:
text: 'New Set'
on_press: root.create_new_card_set()
NavbarButton:
text: 'Merge'
on_press: root.merge_card_sets()
NavbarButton:
text: 'Learn'
on_press: root.open_learn()
ScrollView:
id: card_set_table
orientation: 'vertical'
do_scroll_x: False
size_hint_y: 11