Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How list up gtk themes? #4

Closed
maru0123-2004 opened this issue Mar 11, 2022 · 6 comments
Closed

How list up gtk themes? #4

maru0123-2004 opened this issue Mar 11, 2022 · 6 comments

Comments

@maru0123-2004
Copy link

How list up gtk themes?
There are no docs for that...

@rdbende
Copy link
Member

rdbende commented Mar 11, 2022

Seems like it's not implemented here, but you can use this Tcl call to get a tuple of the available Gtk themes

widget.tk.call("ttk::theme::gttk::availableStyles")

@maru0123-2004
Copy link
Author

Oh, it's good!
Thank you...!

@maru0123-2004
Copy link
Author

>>> import tkinter
>>> import gttk
>>> from tkinter import ttk
>>> root=tkinter.Tk()
>>> gttk=gttk.GTTK(root) 
>>> style=ttk.Style()
>>> style.theme_use("gttk") 
>>> gttk   
<gttk.GTTK object at 0x000001C88A9F9E80>
>>> root.tk.call("ttk::theme::gttk::availableStyles")   
''

I tried that. But it return empty string...

@rdbende
Copy link
Member

rdbende commented Mar 11, 2022

Then I don't know 🤷‍♂.
For me it returns a tuple with the installed Gtk, themes that I have in /usr/share/themes

('Breeze', 'Breeze-Dark', 'Dracula', 'Raleigh', 'Yaru-dark', 'Yaru-light')

@maru0123-2004
Copy link
Author

Oh...
Now I trying put theme in get_themes_directory's output....

@maru0123-2004
Copy link
Author

It right... I was wrong. Sorry...
I get this on Windows:

('Adwaita',)

I think I would make pull request about this.

Thanks for your all helping....!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants