definite-d / Themera

PySimpleGUI theme code generator.
GNU Lesser General Public License v3.0
28 stars 9 forks source link

New PySimpleGUI theme capability.... #8

Closed PySimpleGUI closed 4 years ago

PySimpleGUI commented 4 years ago

I've added a new function that will help you out in making themes. Or it'll help users.

I don't like the hack that I made in allowing users to add to the dictionary of themes, so I thought it's time to add the capability.

In the tkinter port, there's a new function theme_add_new. It's on GitHub in version 4.20.0.1

It needs to be ported across the other 3 ports and then released to PyPI yet. I'll open an enhancement so that people know it's coming.

theme_dict = {'BACKGROUND': '#2B475D',
                'TEXT': '#FFFFFF',
                'INPUT': '#F2EFE8',
                'TEXT_INPUT': '#000000',
                'SCROLL': '#F2EFE8',
                'BUTTON': ('#000000', '#C2D4D8'),
                'PROGRESS': ('#FFFFFF', '#C7D5E0'),
                'BORDER': 1,'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0}

sg.theme_add_new('Dashboard', theme_dict)

sg.theme('Dashboard')
definite-d commented 4 years ago

Hi!

That's nice to know! I'll mirror this change to LookyFeely's code generation mechanisms.

definite-d commented 4 years ago

Change fully implemented. Thanks again.