-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatacrypt.kv
More file actions
294 lines (255 loc) · 15.4 KB
/
datacrypt.kv
File metadata and controls
294 lines (255 loc) · 15.4 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
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
#:import get_color_from_hex kivy.utils.get_color_from_hex
#:import colors kivymd.color_definitions.colors
<TooltipIconButton@MDIconButton+MDTooltip>:
tooltip_bg_color: app.theme_cls.primary_color
tooltip_text_color: get_color_from_hex(colors["Light"]["CardsDialogs"])
MDNavigationLayout:
ScreenManager:
id: screen_manager
MDScreen:
name: "home"
md_bg_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#E0E0E0") or get_color_from_hex("#0A0E17") # Cybersecurity/hacking background
MDBoxLayout:
orientation: "vertical"
# Simplified AppBar - completely redesigned
MDBoxLayout:
orientation: "horizontal"
size_hint_y: None
height: "56dp" # Standard height
padding: ["8dp", "0dp", "8dp", "0dp"]
md_bg_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#455A64") or get_color_from_hex("#1A2130") # Cybersecurity/hacking header
# Menu button
MDIconButton:
icon: "menu"
theme_text_color: "Custom"
text_color: get_color_from_hex("#ffffff")
pos_hint: {"center_y": .5}
on_release: root.ids.nav_drawer.set_state("open")
# App title with logo - simplified
MDBoxLayout:
orientation: "horizontal"
size_hint_x: 1 # Take all available space
pos_hint: {"center_y": .5}
spacing: "12dp"
padding: ["4dp", "0dp", "0dp", "0dp"]
# Logo
Image:
source: "assets/logo.png"
size_hint: None, None
size: "36dp", "36dp"
pos_hint: {"center_y": .5}
# App name - single text label with fixed properties
MDLabel:
text: "DataCrypt"
theme_text_color: "Custom"
text_color: get_color_from_hex("#ffffff")
bold: True
font_size: "20sp"
pos_hint: {"center_y": .5}
size_hint_x: None
width: "150dp" # Wider fixed width
height: "36dp" # Fixed height
halign: "left"
valign: "middle"
markup: False # No markup
shorten: False # No shortening
max_lines: 1 # Force single line
# Main Content with scrolling
ScrollView:
do_scroll_x: False
do_scroll_y: True
MDBoxLayout:
orientation: "vertical"
padding: "16dp"
spacing: "20dp"
adaptive_height: True
# Welcome message - hacker styled
MDCard:
orientation: "vertical"
padding: "16dp"
spacing: "8dp"
md_bg_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#455A64") or get_color_from_hex("#1A2130")
radius: [4,] # More angular for hacker aesthetic
elevation: 1
size_hint_y: None
height: "100dp"
MDLabel:
text: "Welcome to DataCrypt"
font_style: "H6"
theme_text_color: "Custom"
text_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#FFFFFF") or get_color_from_hex("#E0E0E0")
bold: True
MDLabel:
text: "Secure your files with military-grade encryption"
theme_text_color: "Custom"
text_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#E0F2F1") or get_color_from_hex("#64FFDA")
font_style: "Body2"
# Key Input Section - hacker styled
MDCard:
orientation: "vertical"
padding: "20dp"
spacing: "16dp"
md_bg_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#F5F5F5") or get_color_from_hex("#162029")
radius: [4,] # More angular for hacker aesthetic
elevation: 1
size_hint_y: None
height: "160dp"
# Section header with icon
MDBoxLayout:
orientation: "horizontal"
adaptive_height: True
spacing: "12dp"
MDIcon:
icon: "key-variant"
theme_text_color: "Custom"
text_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#455A64") or get_color_from_hex("#00E676")
size_hint: None, None
size: "24dp", "24dp"
pos_hint: {"center_y": .5}
MDLabel:
text: "Encryption Key"
font_style: "H6"
theme_text_color: "Custom"
text_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#000000") or get_color_from_hex("#FFFFFF")
bold: True
# Key input field and generate button
MDBoxLayout:
orientation: "horizontal"
spacing: "12dp"
MDTextField:
id: key_input
hint_text: "Enter or generate encryption key"
mode: "fill"
fill_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#FFFFFF") or get_color_from_hex("#424242")
text_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#000000") or get_color_from_hex("#ffffff")
hint_text_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#000000") or get_color_from_hex("#9e9e9e")
helper_text: "This key will encrypt/decrypt your files"
helper_text_mode: "persistent"
size_hint_x: 0.7
line_color_normal: app.theme_cls.theme_style == "Light" and get_color_from_hex("#e0e0e0") or get_color_from_hex("#555555")
MDFillRoundFlatIconButton:
text: "Generate"
icon: "key-plus"
on_release: app.generate_key()
size_hint_x: 0.3
md_bg_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#455A64") or get_color_from_hex("#00E676")
text_color: "white"
pos_hint: {"center_y": .5}
# File Selection Section - hacker styled
MDCard:
orientation: "vertical"
padding: "20dp"
spacing: "16dp"
md_bg_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#F5F5F5") or get_color_from_hex("#162029")
radius: [4,] # More angular for hacker aesthetic
elevation: 1
size_hint_y: None
height: "180dp"
# Section header with icon
MDBoxLayout:
orientation: "horizontal"
adaptive_height: True
spacing: "12dp"
MDIcon:
icon: "file-document-outline"
theme_text_color: "Custom"
text_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#F44336") or get_color_from_hex("#FF5252")
size_hint: None, None
size: "24dp", "24dp"
pos_hint: {"center_y": .5}
MDLabel:
text: "Select File"
font_style: "H6"
theme_text_color: "Custom"
text_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#000000") or get_color_from_hex("#FFFFFF")
bold: True
# File input field
MDTextField:
id: file_input
hint_text: "Selected file path will appear here"
mode: "fill"
fill_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#FFFFFF") or get_color_from_hex("#424242")
text_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#000000") or get_color_from_hex("#ffffff")
hint_text_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#000000") or get_color_from_hex("#9e9e9e")
size_hint_y: None
height: "48dp"
line_color_normal: app.theme_cls.theme_style == "Light" and get_color_from_hex("#e0e0e0") or get_color_from_hex("#555555")
readonly: True
# Browse buttons
MDBoxLayout:
orientation: "horizontal"
spacing: "12dp"
adaptive_height: True
MDFillRoundFlatIconButton:
text: "Browse Files"
icon: "folder-open"
on_release: app.open_file_manager(False)
size_hint_x: 0.5
md_bg_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#D32F2F") or get_color_from_hex("#FF5252")
text_color: "white"
MDFillRoundFlatIconButton:
text: "Encrypted Files"
icon: "folder-key"
on_release: app.open_file_manager(True)
size_hint_x: 0.5
md_bg_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#5D4037") or get_color_from_hex("#7C4DFF")
text_color: "white"
# Action Buttons
MDBoxLayout:
orientation: "vertical"
spacing: "20dp"
adaptive_height: True
padding: [0, "10dp", 0, "10dp"]
# Encrypt button
MDFillRoundFlatIconButton:
text: "ENCRYPT FILE"
icon: "lock"
on_release: app.encrypt_file()
size_hint_x: 1
height: "56dp"
md_bg_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#455A64") or get_color_from_hex("#00E676")
text_color: "white"
font_style: "Button"
font_size: "18sp"
# Decrypt button
MDFillRoundFlatIconButton:
text: "DECRYPT FILE"
icon: "lock-open"
on_release: app.decrypt_file()
size_hint_x: 1
height: "56dp"
md_bg_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#607D8B") or get_color_from_hex("#00BCD4")
text_color: "white"
font_style: "Button"
font_size: "18sp"
# Footer with security info - hacker styled
MDCard:
orientation: "vertical"
padding: "16dp"
spacing: "8dp"
md_bg_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#5D4037") or get_color_from_hex("#1A2130")
radius: [4,] # More angular for hacker aesthetic
elevation: 1
size_hint_y: None
height: "80dp"
MDBoxLayout:
orientation: "horizontal"
adaptive_height: True
MDIcon:
icon: "shield-key"
theme_text_color: "Custom"
text_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#FFAB00") or get_color_from_hex("#FFAB00")
size_hint: None, None
size: "24dp", "24dp"
MDLabel:
text: "Your files are secured with military-grade AES-256 encryption"
theme_text_color: "Custom"
text_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#FFFFFF") or get_color_from_hex("#E0E0E0")
font_style: "Body2"
padding_x: "8dp"
# Navigation Drawer
MDNavigationDrawer:
id: nav_drawer
radius: (0, 16, 16, 0)
md_bg_color: app.theme_cls.theme_style == "Light" and get_color_from_hex("#ffffff") or get_color_from_hex("#1e1e1e")
ContentNavigationDrawer: