1

i am working on a tkinter app and I just updated to the latest version of python(python 3.9.5) and tkinter is using my mac's default theme, which doesn't go with my design.

i want this(the light theme): enter image description here

but what am getting is(the dark theme): enter image description here

is there a way I can change the theme to light or to check the current mac theme?

my code:

from tkinter import *

class Snipper:

    def __init__(self):
       self.root = Tk()
       self.root.title("snipper")

       self.build()

       # bring app to front after start
       self.root.lift()
       self.root.attributes('-topmost',True)
       self.root.after_idle(self.root.attributes,'-topmost',False)

       self.root.minsize(1000, 600)
       self.root.mainloop()



 s = Snipper()
  • 1
    Is this a problem for all widgets, or are you just asking how to get a white background on the root window? – Bryan Oakley May 12 '21 at 19:21
  • i tried with button and text widgets they are both dark. so yeah I think it is a problem for all widgets that come shipped with tkinter and ttk. and also asking for how to change theme(get white background on root and title window). –  May 12 '21 at 19:25
  • @NahuGere so ```self.root.configure(bg = "white")``` doesn't work for you – Ali Saad May 14 '21 at 12:10
  • Does this answer your question? [Changing color of buttons in tkinter works on Windows but not Mac OSX](https://stackoverflow.com/questions/51014756/changing-color-of-buttons-in-tkinter-works-on-windows-but-not-mac-osx) – Ali Saad May 14 '21 at 12:25
  • no this is not what i was looking for –  May 16 '21 at 09:36

0 Answers0