Skip to content

Commit 6430443

Browse files
Update aurora_text_editor.py
1 parent ee27874 commit 6430443

File tree

1 file changed

+8
-38
lines changed

1 file changed

+8
-38
lines changed

src/aurora_text_editor.py

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
#* Aurora Text Editor
33
#? Minimalistic text editor
4-
#? Version: 0.8
4+
#? Version: 0.8.1
55

66
from tkinter import *
77
from tkinter.messagebox import askyesno, QUESTION, showwarning
@@ -35,7 +35,7 @@ def is_modified_text_event(Event):
3535

3636
# <--- Window init
3737
prog_name = 'Aurora Text Editor'
38-
prog_version = ' v0.8'
38+
prog_version = ' v0.8.1'
3939
window = Tk()
4040
window.title(prog_name+prog_version)
4141
# --->
@@ -239,44 +239,14 @@ def on_menu_set_theme(theme_str: str):
239239
'Light': ['black', 'white', 'black'],
240240
'Black and White': ['white', 'black', 'white'],
241241
'Cyberpunk': ['#00c2a2', '#25022d', 'red'],
242-
'Cybperunk Raspberry': ['#f1136e', 'black', 'red'],
242+
'Cyberpunk Raspberry': ['#f1136e', 'black', 'red'],
243243
'Terminal': ['lime', 'black', 'lime']
244244
}
245245

246-
if theme_str == 'Light':
247-
248-
text.configure(foreground = theme_list['Light'][0],
249-
background = theme_list['Light'][1],
250-
insertbackground = theme_list['Light'][2])
251-
theme_name = theme_str
252-
253-
elif theme_str == 'Black and White':
254-
255-
text.configure(foreground = theme_list['Black and White'][0],
256-
background = theme_list['Black and White'][1],
257-
insertbackground = theme_list['Black and White'][2])
258-
theme_name = theme_str
259-
260-
elif theme_str == 'Cyberpunk':
261-
262-
text.configure(foreground = theme_list['Cyberpunk'][0],
263-
background = theme_list['Cyberpunk'][1],
264-
insertbackground = theme_list['Cyberpunk'][2])
265-
theme_name = theme_str
266-
267-
elif theme_str == 'Cyberpunk Raspberry':
268-
269-
text.configure(foreground = theme_list['Cybperunk Raspberry'][0],
270-
background = theme_list['Cybperunk Raspberry'][1],
271-
insertbackground = theme_list['Cybperunk Raspberry'][2])
272-
theme_name = theme_str
273-
274-
elif theme_str == 'Terminal':
275-
276-
text.configure(foreground = theme_list['Terminal'][0],
277-
background = theme_list['Terminal'][1],
278-
insertbackground = theme_list['Terminal'][2])
279-
theme_name = theme_str
246+
text.configure(foreground = theme_list[theme_str][0],
247+
background = theme_list[theme_str][1],
248+
insertbackground = theme_list[theme_str][2])
249+
theme_name = theme_str
280250

281251
# --->
282252

@@ -401,7 +371,7 @@ def show_about_window():
401371
about_label.pack(side=TOP)
402372

403373
about_info_label = Label(master=about_window, text='Minimalistic text editor.\nCreated with Python and Tkinter.\n\nThank you for using this program!', relief='solid', padx=20, pady=10)
404-
about_ok_button = Button(master=about_window, text='OK', command= lambda: about_window.destroy())
374+
about_ok_button = Button(master=about_window, text='OK', command = lambda: about_window.destroy())
405375

406376
about_ok_button.pack(side=BOTTOM)
407377
about_info_label.pack(side=TOP)

0 commit comments

Comments
 (0)