From a9f1609f447ba7a7f9465845ca852a35f790a8ad Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Mon, 3 Aug 2020 08:27:16 -0400 Subject: [PATCH] Set the combobox's button colors to be the same as the theme's button colors --- PySimpleGUI.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 81f3136e..41ca3a3a 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -version = __version__ = "4.27.4 Released 3-Aug-2020" +version = __version__ = "4.27.4.1 Unreleased\nAdded setting of combobox button color to be theme's button color" port = 'PySimpleGUI' @@ -11339,6 +11339,12 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): combostyle.configure(style_name, fieldbackground=element.BackgroundColor) combostyle.configure(style_name, selectforeground=element.TextColor) + try: + combostyle.configure(style_name, arrowcolor=theme_button_color()[0]) + combostyle.configure(style_name, background=theme_button_color()[1]) + except Exception as e: + print('* Problem setting combobox button color *', e) + # Strange code that is needed to set the font for the drop-down list element._newfont = tkinter.font.Font(font=font) tk_row_frame.option_add("*TCombobox*Listbox*Font", element._newfont)