Python Forum

Full Version: [Tutorial] PyGtk3 How To Change Applicaton Theme
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
changing app theme in PyGtk3 is very easy. look at  following code.

import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk as gtk

settings = gtk.Settings.get_default()
settings.set_property("gtk-theme-name", "Numix")
settings.set_property("gtk-application-prefer-dark-theme", False)  # if you want use dark theme, set second arg to True

# getting all existing properties #

for i in settings.list_properties():
    print(i)
Note: i couldn't post this thread in Fourm>Tutorials>GUI so i posted in here. Please do not delete this thread, only just move it