Skip to content

Commit 83117e9

Browse files
committed
Started work on a constantly colour changing function
1 parent 98ff34f commit 83117e9

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

main.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,25 @@ def prefs_window():
7575

7676
menubar.grid_button('prefs', row=0, column=4)
7777

78+
## Experimental
79+
changing_theme = [0, 0, 0]
80+
def changing_theme_func():
81+
global changing_theme
82+
for i, item in enumerate(changing_theme):
83+
item += 1
84+
if item > 255:
85+
item = 0
86+
#changing_theme[i] = item
87+
else:
88+
changing_theme[i] = item
89+
break
90+
if changing_theme == [255,255,255]:
91+
changing_theme = [0,0,0]
92+
update_theme('#%02x%02x%02x' % tuple(changing_theme), '#000000')
93+
root.after(10, changing_theme_func)
94+
#changing_theme_func()
95+
96+
7897

7998
## Packing
8099
frame_menubar.pack(side='top', expand=1, fill='both')

notes.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ For a colour picker:
44

55
To change the colour of the cursor:
66
# textwidget.config(bg='#00ff00', insertbackground='#ff00ff')
7-
insertbackground is what the colour will be.
7+
insertbackground is what the colour will be.
8+
9+
In main.py add reversing smooth mode to ## Experimental changing_theme.

0 commit comments

Comments
 (0)