TkinterEP / ttkthemes

A group of themes for the ttk extenstions for Tkinter
GNU General Public License v3.0
365 stars 47 forks source link

Change theme_use to return active theme name if no args to implement #6 #7

Closed Akuli closed 7 years ago

Akuli commented 7 years ago

Now style.theme_use() can be also called without any arguments to check which theme is currently being used. Previously this worked with plain ttk, but not with ttkthemes:

>>> from tkinter import ttk
>>> import ttkthemes
>>> ttk.Style().theme_use()
'default'
>>> ttkthemes.ThemedStyle().theme_use()
Traceback (most recent call last):
  ...
TypeError: set_theme() missing 1 required positional argument: 'theme_name'
>>>
Akuli commented 7 years ago

Is there anything else you want me to add or is the PR ready for merging?

Akuli commented 7 years ago

Oops, I clicked the wrong button and closed this accidentally.

Akuli commented 7 years ago

As you can see, not all code I write is :hankey: :D