Window to set settings that will be used across all PySimpleGUI programs that choose to use them. Use set_options to set the path to the folder for all PySimpleGUI settings. :return: True if settings were changed :rtype: (bool)
()
| 25740 | |
| 25741 | |
| 25742 | def main_global_pysimplegui_settings(): |
| 25743 | """ |
| 25744 | Window to set settings that will be used across all PySimpleGUI programs that choose to use them. |
| 25745 | Use set_options to set the path to the folder for all PySimpleGUI settings. |
| 25746 | |
| 25747 | :return: True if settings were changed |
| 25748 | :rtype: (bool) |
| 25749 | """ |
| 25750 | global DEFAULT_WINDOW_SNAPSHOT_KEY_CODE, ttk_part_mapping_dict, DEFAULT_TTK_THEME |
| 25751 | |
| 25752 | key_choices = tuple(sorted(tkinter_keysyms)) |
| 25753 | |
| 25754 | settings = pysimplegui_user_settings.read() |
| 25755 | |
| 25756 | editor_format_dict = { |
| 25757 | 'pycharm': '<editor> --line <line> <file>', |
| 25758 | 'notepad++': '<editor> -n<line> <file>', |
| 25759 | 'sublime': '<editor> <file>:<line>', |
| 25760 | 'vim': '<editor> +<line> <file>', |
| 25761 | 'wing': '<editor> <file>:<line>', |
| 25762 | 'visual studio': '<editor> <file> /command "edit.goto <line>"', |
| 25763 | 'atom': '<editor> <file>:<line>', |
| 25764 | 'spyder': '<editor> <file>', |
| 25765 | 'thonny': '<editor> <file>', |
| 25766 | 'pydev': '<editor> <file>:<line>', |
| 25767 | 'idle': '<editor> <file>'} |
| 25768 | |
| 25769 | tooltip = 'Format strings for some popular editors/IDEs:\n' + \ |
| 25770 | 'PyCharm - <editor> --line <line> <file>\n' + \ |
| 25771 | 'Notepad++ - <editor> -n<line> <file>\n' + \ |
| 25772 | 'Sublime - <editor> <file>:<line>\n' + \ |
| 25773 | 'vim - <editor> +<line> <file>\n' + \ |
| 25774 | 'wing - <editor> <file>:<line>\n' + \ |
| 25775 | 'Visual Studio - <editor> <file> /command "edit.goto <line>"\n' + \ |
| 25776 | 'Atom - <editor> <file>:<line>\n' + \ |
| 25777 | 'Spyder - <editor> <file>\n' + \ |
| 25778 | 'Thonny - <editor> <file>\n' + \ |
| 25779 | 'PyDev - <editor> <file>:<line>\n' + \ |
| 25780 | 'IDLE - <editor> <file>\n' |
| 25781 | |
| 25782 | tooltip_file_explorer = 'This is the program you normally use to "Browse" for files\n' + \ |
| 25783 | 'For Windows this is normally "explorer". On Linux "nemo" is sometimes used.' |
| 25784 | |
| 25785 | tooltip_theme = 'The normal default theme for PySimpleGUI is "Dark Blue 13\n' + \ |
| 25786 | 'If you do not call theme("theme name") by your program to change the theme, then the default is used.\n' + \ |
| 25787 | 'This setting allows you to set the theme that PySimpleGUI will use for ALL of your programs that\n' + \ |
| 25788 | 'do not set a theme specifically.' |
| 25789 | |
| 25790 | # ------------------------- TTK Tab ------------------------- |
| 25791 | ttk_scrollbar_tab_layout = [[T('Default TTK Theme', font='_ 16'), Combo([], DEFAULT_TTK_THEME, readonly=True, size=(20, 10), key='-TTK THEME-', font='_ 16')], |
| 25792 | [HorizontalSeparator()], |
| 25793 | [T('TTK Scrollbar Settings', font='_ 16')]] |
| 25794 | |
| 25795 | t_len = max([len(l) for l in TTK_SCROLLBAR_PART_LIST]) |
| 25796 | ttk_layout = [[]] |
| 25797 | for key, item in ttk_part_mapping_dict.items(): |
| 25798 | if key in TTK_SCROLLBAR_PART_THEME_BASED_LIST: |
| 25799 | ttk_layout += [[T(key, s=t_len, justification='r'), Combo(PSG_THEME_PART_LIST, default_value=settings.get(('-ttk scroll-', key), item), key=('-TTK SCROLL-', key))]] |
no test coverage detected