I know that Tkinter is not so modern, not so cool and maybe better to use PyQt or etc.
But it is interesting for me can Tkinter look not so ugly in Ubuntu (Linux). Looks that brew version (in OS X) of python's Tkinter compiled with built-in theme and looks good:
But Ubuntu's Tkinter makes me cry:
I've read that for good theme I need to use ttk, but I dont know exactly how. My code looks as follow:
from Tkinter import *
class App():
def __init__(self, master):
frame = Frame(master)
frame.pack()
master.title("Just my example")
self.label = Label(frame, text="Type very long text:")
self.entry = Entry(frame)
self.button = Button(frame,
text="Quit", fg="red", width=20,
command=frame.quit)
self.slogan = Button(frame,
text="Hello", width=20,
command=self.write_slogan)
self.label.grid(row=0, column=0)
self.entry.grid(row=0, column=1)
self.slogan.grid(row=1, column=0)
self.button.grid(row=1, column=1)
def write_slogan(self):
print "Tkinter is easy to use!"
root = Tk()
app = App(root)
root.mainloop()
How to apply standard ubuntu theme or at least better theme?
Thanks.