1 2 3 7 Feb 15:22 2022 diff -l /Users/sean/Downloads/ETC.py ./ETC.py Page 1 4 5 6 9c9,26 7 < colorBackground = '#F0F0F0' 8 --- 9 > #CHANGES Dark/Light 10 > 11 > import subprocess 12 > 13 > def check_appearance(): 14 > """Checks DARK/LIGHT mode of macos.""" 15 > cmd = 'defaults read -g AppleInterfaceStyle' 16 > p = subprocess.Popen(cmd, stdout=subprocess.PIPE, 17 > stderr=subprocess.PIPE, shell=True) 18 > return bool(p.communicate()[0]) 19 > 20 > if check_appearance() == True: 21 > colorBackground = '#282c34' 22 > colorText = '#F0F0F0' 23 > else: 24 > colorBackground = '#F0F0F0' 25 > colorText = '#282c34' 26 > 27 30c47 28 < self.configure(font=("Helvetica",16,"bold"), bg = colorBackground, borderwidth = 0, highlightthickness = 0) 29 --- 30 > self.configure(font=("Helvetica",16,"bold"), bg = colorBackground, fg = colorText, borderwidth = 0, highlightthickness = 0) 31 43c60 32 < self.e[i].configure(fg ='black',bg = colorBackground, borderwidth = 0.2, highlightthickness = 0) 33 --- 34 > self.e[i].configure(bg = colorBackground, fg = colorText, borderwidth = 0.2, highlightthickness = 0) 35 50c67 36 < self.l[i].configure(fg = 'black',bg = colorBackground) 37 --- 38 > self.l[i].configure(fg = colorText,bg = colorBackground) 39 83c100 40 < [frame_scope.l[i].configure(font=("Helvetica",14),text=labels_text[i]) for i in range(0,6)] 41 --- 42 > [frame_scope.l[i].configure(font=("Helvetica",14),text=labels_text[i],fg = colorText) for i in range(0,6)] 43 96c113 44 < [frame_camera.l[i].configure(font=("Helvetica",14),text=labels_text[i]) for i in range(0,6)] 45 --- 46 > [frame_camera.l[i].configure(font=("Helvetica",14),text=labels_text[i], fg = colorText) for i in range(0,6)] 47 109c126 48 < [frame_target.l[i].configure(font=("Helvetica",14),text=labels_text[i]) for i in range(0,7)] 49 --- 50 > [frame_target.l[i].configure(font=("Helvetica",14),text=labels_text[i], fg = colorText) for i in range(0,7)] 51 117c134 52 < frame_result.configure(fg = colorBackground,bg=colorBackground,borderwidth = 0, highlightthickness = 0) 53 --- 54 > frame_result.configure(fg = colorText,bg=colorBackground,borderwidth = 0, highlightthickness = 0) 55 240c257 56 < style.configure('Treeview', background='#333842', fieldbackground='#333842', foreground='white') 57 --- 58 > style.configure('Treeview', background=colorBackground, fieldbackground=colorBackground, foreground=colorText) 59 60 61 62 63 64 65 66