Sets/Returns the button color currently in use :return: (str, str) - TUPLE with color strings of the button color currently in use (button text color, button background color) :rtype: (str, str)
(color=None)
| 19748 | |
| 19749 | |
| 19750 | def theme_button_color(color=None): |
| 19751 | """ |
| 19752 | Sets/Returns the button color currently in use |
| 19753 | |
| 19754 | :return: (str, str) - TUPLE with color strings of the button color currently in use (button text color, button background color) |
| 19755 | :rtype: (str, str) |
| 19756 | """ |
| 19757 | if color is not None: |
| 19758 | if color == COLOR_SYSTEM_DEFAULT: |
| 19759 | color_tuple = (COLOR_SYSTEM_DEFAULT, COLOR_SYSTEM_DEFAULT) |
| 19760 | else: |
| 19761 | color_tuple = button_color_to_tuple(color, (None, None)) |
| 19762 | if color_tuple == (None, None): |
| 19763 | if not SUPPRESS_ERROR_POPUPS: |
| 19764 | popup_error('theme_button_color - bad color string passed in', color) |
| 19765 | else: |
| 19766 | print('** Badly formatted button color... not a tuple nor string **', color) |
| 19767 | set_options(button_color=color) # go ahead and try with their string |
| 19768 | else: |
| 19769 | set_options(button_color=color_tuple) |
| 19770 | return DEFAULT_BUTTON_COLOR |
| 19771 | |
| 19772 | |
| 19773 | def theme_button_color_background(): |
no test coverage detected