rdbende / Azure-ttk-theme

A stunning modern theme for ttk inspired by Fluent Design 💠
MIT License
739 stars 136 forks source link

Exception has occurred: TclError couldn't read file "./theme/light.tcl": no such file or directory #21

Closed zSynctic closed 2 years ago

rdbende commented 2 years ago

This issue has been fixed in September, I just forgot to make a new release for it. It should work with version 2.1.

zSynctic commented 2 years ago

How can I get version 2.1

rdbende commented 2 years ago

You can download the archive here: https://github.com/rdbende/Azure-ttk-theme/releases/tag/v2.1.0

zSynctic commented 2 years ago

Ok thanks I will try that

zSynctic commented 2 years ago

I get this issue now when I try to run the example.py: Exception has occurred: TclError couldn't read file "azure.tcl": no such file or directory

rdbende commented 2 years ago

You probably have specified a wrong path to the azure.tcl file.

zSynctic commented 2 years ago

It's the first time for me to use a theme so I don't know how to really use one I just downloaded the zip and extracted it into the folder where I'm doing tkinter.

rdbende commented 2 years ago

If you have the azure.tcl in the same directory, then it should work. Except if the editor you're using changes the working directory when running the file. Then you could check out this comment: https://github.com/rdbende/Azure-ttk-theme/issues/12#issuecomment-862441699

zSynctic commented 2 years ago

image Do I need to get out everything in the folder out or what can I do? or should I use the same thing #12 did

rdbende commented 2 years ago

The best solution is to write Azure-ttk-theme-2.1.0/azure.tcl in the code, but it's also a solution to put idk.py into Azure-ttk-theme-2.1.0 folder.

zSynctic commented 2 years ago

I added idk.py into azure-ttk-theme-2.1.0 folder but still it doesn't works

zSynctic commented 2 years ago

image

rdbende commented 2 years ago

Then you should try what #12 did.

zSynctic commented 2 years ago

image

rdbende commented 2 years ago

Instead of style.theme_use('azure') you should use root.tk.call('set_theme', 'light') to set the theme.

Or you can also use style.theme_use('light') (or dark), but I don't recommend this way.

zSynctic commented 2 years ago

You mean like this? image

rdbende commented 2 years ago

Yes, but please check out the readme, where it is written that some styles changed names, and now you have to use Accent.TButton instead of Accentbutton.

zSynctic commented 2 years ago

Oh ok thank you