-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.kv
226 lines (207 loc) · 7 KB
/
main.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
217
218
219
220
221
222
223
224
225
226
#: import win kivy.core.window.Window
#: import Clock kivy.clock.Clock
<FileManager>:
_dir_selector: dir_selector
_file_chooser: file_chooser
background: 'invisible.png'
background_color: 0,0,0,0
size_hint: None, None
size: win.width * 0.65, win.height * 0.7
auto_dismiss: False
on_open: _side_selector.width = dp(130)
canvas.before:
BorderImage:
source: 'shadow32.png'
border: (26, 26, 26, 26)
size:(root.width + 68, root.height + 68)
pos: (root.x-36, root.y-36)
BoxLayout:
orientation: 'vertical'
BoxLayout:
size_hint_y: None
height: '40dp'
canvas.before:
Color:
rgba: .8,.8,.8,1
RoundedRectangle:
size: self.size
pos: self.pos
radius: [(10.0, 10.0), (10.0, 10.0), (0, 0), (0, 0)]
Label:
text: 'Open File'
color: 0,0,0,1
bold: True
ImageButton_:
size: '32dp', '32dp'
size_hint: None,None
pos_hint: {'center_y': .5, 'center_x': .5}
source: 'window_cancel.png'
on_release: root.dismiss()
BoxLayout:
SideSelector_:
id: _side_selector
size_hint_x: None
width: '130dp'
cols: 1
canvas.before:
Color:
rgba: .9,.9,.9,1
Rectangle:
size: self.size
pos: self.pos
Button_:
text: 'Home'
source: 'small_home.png'
on_release: file_chooser.path = root.get_defualt_user_dir()
Button_:
text: 'Documents'
source: 'small_document.png'
on_release: root.set_side_panel_dir(self.text)
Button_:
text: 'Downloads'
source: 'small_download.png'
on_release: root.set_side_panel_dir(self.text)
Button_:
text: 'Desktop'
source: 'small_folder.png'
on_release: root.set_side_panel_dir(self.text)
Button_:
text: 'Pictures'
source: 'small_picture.png'
on_release: root.set_side_panel_dir(self.text)
Button_:
text: 'Musics'
source: 'small_music.png'
on_release: root.set_side_panel_dir(self.text)
Button_:
text: 'Videos'
source: 'small_video.png'
on_release: root.set_side_panel_dir(self.text)
StudioSplitter:
min_size: self.parent.width*0.7
max_size: max(self.parent.width*0.8, dp(130))
on_right:
self.right=self.parent.right;
_side_selector.width = self.parent.width-self.width
BoxLayout:
orientation: 'vertical'
canvas.before:
Color:
rgba: 1,1,1,1
Rectangle:
size: self.size
pos: self.pos
BoxLayout:
size_hint_y: None
height: '48dp'
ScrollView:
id: dir_scroll
canvas.after:
Color:
rgba: .5,.5,.5,.5
Line:
points: [self.x, self.y, self.right, self.y]
BoxLayout:
size_hint_x: None
width: self.minimum_width
padding: '6dp'
spacing: '4dp'
rows: 1
id: dir_selector
ImageButton_:
source: 'new_folder.png'
size: '40dp', '40dp'
size_hint: None,None
on_release: root.handle_bubble(self)
BoxLayout:
FileChooserThumbView:
id: file_chooser
on_path: root.on_path(self.path)
on_file_select: root.file_selected(*args)
# progress_cls: 'Widget'
BoxLayout:
id: saving_container
size_hint_y: None
height: max(dp(10), self.minimum_height)
padding: '6dp'
canvas.before:
Color:
rgba: 1,1,1,1
RoundedRectangle:
size: self.size
pos: self.pos
radius: [(0, 0), (0, 0), (10.0, 10.0), (10.0, 10.0)]
<Button_@Button>:
background_normal: ''
background_color: .9,.9,.9,1
source: ''
color: .6,.6,.6,1
size_hint_y: None
height: '40dp'
BoxLayout:
size: root.size
pos: root.pos
Image:
size_hint_x: None
width: '40dp'
source: root.source
<DirButton_@Button>:
background_normal: ''
background_color: .9,.9,.9,1
color: 0,0,0,1
size_hint: (None, None)
width: self.texture_size[0] + dp(20)
height: '40dp'
dir_path: ''
<ImageButton_@Button>:
background_normal: ''
source: ''
background_color: 0,0,0,0
Image:
size: root.size
pos: root.pos
source: root.source
<NewFolderBub_@Bubble>:
size_hint: None,None
size: '180dp','90dp'
arrow_pos: 'top_right'
background_color: .6,.6,1,.8
on_parent: input.focus =True
BoxLayout:
padding: '5dp'
orientation: 'vertical'
Label:
text: 'Folder Name'
bold: True
TextInput:
id: input
size_hint_y: None
height: '36dp'
cursor_color: .2,.2,.2,1
multiline: False
<SaveWidget_@BoxLayout>:
size_hint_y: None
height: '60dp'
on_parent: input.focus =True
Label:
size_hint_x: None
width: self.texture_size[0] + dp(10)
text: 'Name'
bold: True
color: .3,.3,.3,1
TextInput:
id: input
size_hint_y: None
height: '36dp'
cursor_color: .2,.2,.2,1
multiline: False
pos_hint: {'center_y': .5}
text: 'Untitled-1'
Button:
text: 'Save'
size_hint: None, None
background_normal: 'button.png'
background_color: .5,.5,.5,1
width: self.texture_size[0] + dp(16)
height: self.texture_size[1] + dp(10)
pos_hint: {'center_y': .5}