Skip to content

Conversation

@deajan
Copy link
Contributor

@deajan deajan commented Jan 25, 2026

Abstract: Tkinter looks quite old.
There are some really nice looking themes (like SunnyValley Themes), see https://github.com/rdbende/Sun-Valley-ttk-theme or https://github.com/rdbende/Azure-ttk-theme

Themes are installed via:

python -m pip install sv_ttk

While they can be loaded manually after a window.finalise() call, it becomes a real burden to manually theme all FreeSimpleGUI widgets one by one.

Here's a patch that allows to specify alternative paths for ttk themes.
This allows loading any ttk theme you want directly into FreeSimpleGUI and avoid errors like Tkinter error: "can't find package ttk::theme::sv_ttk". Is this a headless server ? when trying to manually load said themes.

Abstract code to show what is possible:

import os 
import FreeSimpleGUI as sg
import sv_ttk # noqa # we don't need to access this, only import to retrieve module path

# Load custom sv_ttk light theme
sg.ADDITIONAL_TTK_STYLING_PATHS = path = os.path.join(os.path.dirname(sv_ttk.__file__), "sv.tcl")
sg.DEFAULT_TTK_THEME = f"sun-valley-light"

layout = [
    [sg.Text("Sun Valley Light Theme Test")],
    [sg.InputCombo(("Option 1", "Option 2", "Option 3"), default_value="Option 1")],
    [sg.Button("OK"), sg.Button("Cancel")]
]

window = sg.Window("Sun Valley Light Theme Example", layout)
while True:
    event, values = window.read()
    if event in (sg.WIN_CLOSED, "Cancel"):
        break
window.close()
Before After
{CBD3A866-2513-4B9F-95B4-2EB1BBE2C097} {721B562C-5508-43E8-9CB0-252121A851E4}

Of course, this is just a demonstration of a combobox, but almost all widgets gain from these themes.

@deajan deajan changed the title Add external TTK themes Add external TTK themes capabilities Jan 25, 2026
@deajan
Copy link
Contributor Author

deajan commented Jan 25, 2026

Also fixes PySimpleGUI/PySimpleGUI#4984

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

Successfully merging this pull request may close these issues.

1 participant