-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes.kv
More file actions
196 lines (174 loc) · 4.5 KB
/
notes.kv
File metadata and controls
196 lines (174 loc) · 4.5 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
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
<ListItem>:
canvas.before:
Color:
rgba: 0, 0, 0, .9
Line:
width: 1.
rectangle: (self.x, self.y, self.width, self.height)
orientation:"vertical"
Label:
text:root.title
color:"black"
height: self.texture_size[1]
Label:
text:root.content
color:"black"
size_hint_y: None
text_size: self.width, None
height: self.texture_size[1]
<TagItem>:
canvas.before:
Color:
rgba: 1, 1, 1, 1
Line:
width: 1.
rectangle: (self.x, self.y, self.width, self.height)
Rectangle:
size:self.width,self.height
pos:self.x,self.y
size_hint_y:None
size_hint_x:None
orientation:"horizontal"
Label:
id: tagText
text: root.tagName
height:self.texture_size[1]
width:self.texture_size[0]
color:root.color
CheckBox:
id: cb
on_active: root.checkbox_click(self, self.active)
active: self.parent.activate
<AssociatedTags>:
do_scroll_x:True
BoxLayout:
id: tagList
orientation: "horizontal"
# Fixes for horizontal scroll to work properly
width: self.minimum_width
size_hint_x:None
<DisplayList>:
size_hint_y: 0.6
canvas.before:
Color:
rgba: .1, 1,.1, .9
Line:
width: 2.
rectangle: (self.x, self.y, self.width, self.height)
ScrollView:
id:scroll
do_scroll_x: False
do_scroll_y: True
BoxLayout:
orientation:"vertical"
padding: 10,10
size_hint_y:None
id: noteList
<InsertNote>:
orientation:"vertical"
padding: 10
canvas:
Color:
rgba: .1, .1, 1, .9
Line:
width: 2.
rectangle: (self.x, self.y, self.width, self.height)
TextInput:
id: enterTitle
multiline: False
focus:True
hint_text: "Enter note Title"
font_size: "20sp"
background_color: 0,0,0,0
foreground_color: 0,1,255,0.7
size_hint_y: 0.3
padding: [3,3,3,3]
TextInput:
id: assignTag
multiline: False
hint_text: "Tag your note with some new Subject or Topic"
font_size:"15sp"
background_color: 0,0,0,0
foreground_color: 0,1,255,0.7
size_hint_y: 0.5
padding: [1,1,1,1]
Button:
text: "Consider Tag "
on_press:root.fetchTagInput()
on_release: root.removeText(root.ids['assignTag'])
size_hint_x:0.25
size_hint_y:0.2
AssociatedTags:
id: chosenTags
TextInput:
#Enter Note here
id: enterNote
tag:"default"
multiline: True
focus:True
hint_text: "Enter your note here.."
font_size: "18sp"
background_color: 0,0,0,0
foreground_color: 0,1,255,0.7
#Leave space to add tags
Button:
id: insertNote
on_press: root.addNote()
on_release: root.removeText(root.ids['enterTitle'],root.ids['enterNote'],root.ids['assignTag'])
text:"ADD"
padding: 10
background_color:"blue"
size_hint: 1, None
height: "40dp"
pos_hint: {'center_x': .5}
<NoteManager>:
id:NM
labelNote: title
orientation: "vertical"
BoxLayout:
canvas.before:
Color:
rgba: 1,1,1,1
Rectangle:
size: self.size
pos: self.pos
padding: 20
orientation: "vertical"
height: "50dp"
Label:
id:title
text: "Freedom Note"
text_size: self.size
font_size:35
halign:'left'
valign:'top'
color: "black"
size_hint_y:0.25
BoxLayout:
orientation: "horizontal"
size_hint_y:0.12
TextInput:
id:notesSearch
multiline: False
hint_text: "Search term"
Button:
id:searchNow
text: "Search"
on_press: root.ids['noteListParent'].searchCall(criteria=0,title=root.ids['notesSearch'].text)
on_release: root.removeText(root.ids['notesSearch'])
Button:
id:clearSearch
text: "Clear Filters"
on_press:root.ids['noteListParent'].searchCall(criteria=2,title=None)
on_release:root.ids['noteListParent'].removeText(root.ids['notesSearch']) ,root.ids['noteListParent'].resetSelections()
Button:
id:taggedSearch
text: "Filter by Tags"
on_press:root.ids['noteListParent'].searchCall(criteria=1,title=None)
on_release:root.ids['noteListParent'].removeText(root.ids['notesSearch'])
TagsDropDown:
id:tgDrop
InsertNote:
id: viewNotes
DisplayList:
id: noteListParent