commit
4fe20bb901
|
@ -40,8 +40,8 @@ def get_demo_git_files():
|
|||
:rtype: Tuple[List[str], List[str]]
|
||||
"""
|
||||
|
||||
demo_path = sg.user_settings_get_entry('-demos folder-', '')
|
||||
git_demo_path = sg.user_settings_get_entry('-github folder-', '')
|
||||
demo_path = sg.user_settings_get_entry('-demos folder-')
|
||||
git_demo_path = sg.user_settings_get_entry('-github folder-')
|
||||
|
||||
try:
|
||||
git_demo_files = os.listdir(git_demo_path)
|
||||
|
@ -66,7 +66,7 @@ def find_in_file(string):
|
|||
:rtype: List[str]
|
||||
"""
|
||||
|
||||
demo_path = sg.user_settings_get_entry('-demos folder-', '')
|
||||
demo_path = sg.user_settings_get_entry('-demos folder-')
|
||||
demo_files, git_files = get_demo_git_files()
|
||||
|
||||
file_list = []
|
||||
|
@ -95,11 +95,11 @@ def settings_window():
|
|||
"""
|
||||
|
||||
layout = [[sg.T('Program Settings', font='DEFAIULT 18')],
|
||||
[sg.T('Path to Demos', size=(20, 1)), sg.In(sg.user_settings_get_entry('-demos folder-', ''), k='-DEMOS-'), sg.FolderBrowse()],
|
||||
[sg.T('Path to GitHub Folder', size=(20, 1)), sg.In(sg.user_settings_get_entry('-github folder-', ''), k='-GITHUB-'), sg.FolderBrowse()],
|
||||
[sg.T('Github Program', size=(20, 1)), sg.In(sg.user_settings_get_entry('-GitHub Program-', ''), k='-GITHUB PROGRAM-'), sg.FileBrowse()],
|
||||
[sg.T('Editor Program', size=(20, 1)), sg.In(sg.user_settings_get_entry('-Editor Program-', ''), k='-EDITOR PROGRAM-'), sg.FileBrowse()],
|
||||
[sg.Combo(sg.theme_list(), sg.user_settings_get_entry('-theme-', None), k='-THEME-')],
|
||||
[sg.T('Path to Demos', size=(20, 1)), sg.In(sg.user_settings_get_entry('-demos folder-'), k='-DEMOS-'), sg.FolderBrowse()],
|
||||
[sg.T('Path to GitHub Folder', size=(20, 1)), sg.In(sg.user_settings_get_entry('-github folder-'), k='-GITHUB-'), sg.FolderBrowse()],
|
||||
[sg.T('Github Program', size=(20, 1)), sg.In(sg.user_settings_get_entry('-GitHub Program-'), k='-GITHUB PROGRAM-'), sg.FileBrowse()],
|
||||
[sg.T('Editor Program', size=(20, 1)), sg.In(sg.user_settings_get_entry('-Editor Program-'), k='-EDITOR PROGRAM-'), sg.FileBrowse()],
|
||||
[sg.Combo(sg.theme_list(), sg.user_settings_get_entry('-theme-'), k='-THEME-')],
|
||||
[sg.B('Ok'), sg.B('Cancel')],
|
||||
]
|
||||
|
||||
|
@ -124,7 +124,7 @@ def make_window():
|
|||
:rtype: (Window)
|
||||
"""
|
||||
|
||||
theme = sg.user_settings_get_entry('-theme-', None)
|
||||
theme = sg.user_settings_get_entry('-theme-')
|
||||
demo_files, git_files = get_demo_git_files()
|
||||
|
||||
sg.theme(theme)
|
||||
|
@ -153,7 +153,7 @@ def make_window():
|
|||
layout = [[sg.vtop(sg.Column(left_col, element_justification='c')), sg.VSeperator(), sg.vtop(sg.Column(right_col, element_justification='c'))],
|
||||
[sg.HorizontalSeparator()],
|
||||
[sg.Multiline(size=(90, 10), write_only=True, key=ML_KEY, reroute_stdout=True, echo_stdout_stderr=True)],
|
||||
[sg.Combo(sg.user_settings_get_entry('-filenames-', []), default_value=sg.user_settings_get_entry('-last filename-', ''), size=(65, 1),
|
||||
[sg.Combo(sg.user_settings_get_entry('-filenames-', []), default_value=sg.user_settings_get_entry('-last filename-'), size=(65, 1),
|
||||
k='-FILENAME-'), sg.FileBrowse(), sg.B('Clear'), sg.B('Run', k='-RUN INDIVIDUAL-'), sg.B('Edit', k='-EDIT INDIVIDUAL-')],
|
||||
[sg.Button('Edit Me (this program)'),
|
||||
sg.B('Launch GitHub', button_color=(sg.theme_input_background_color(), sg.theme_input_text_color())),
|
||||
|
@ -175,10 +175,10 @@ def main():
|
|||
It will call the make_window function to create the window.
|
||||
"""
|
||||
|
||||
demo_path = sg.user_settings_get_entry('-demos folder-', '')
|
||||
git_demo_path = sg.user_settings_get_entry('-github folder-', '')
|
||||
github_program = sg.user_settings_get_entry('-GitHub Program-', '')
|
||||
editor_program = sg.user_settings_get_entry('-Editor Program-', '')
|
||||
demo_path = sg.user_settings_get_entry('-demos folder-')
|
||||
git_demo_path = sg.user_settings_get_entry('-github folder-')
|
||||
github_program = sg.user_settings_get_entry('-GitHub Program-')
|
||||
editor_program = sg.user_settings_get_entry('-Editor Program-')
|
||||
demo_files, git_files = get_demo_git_files()
|
||||
|
||||
window = make_window()
|
||||
|
@ -238,10 +238,10 @@ def main():
|
|||
if settings_window() is True:
|
||||
window.close()
|
||||
window = make_window()
|
||||
demo_path = sg.user_settings_get_entry('-demos folder-', '')
|
||||
git_demo_path = sg.user_settings_get_entry('-github folder-', '')
|
||||
github_program = sg.user_settings_get_entry('-GitHub Program-', '')
|
||||
editor_program = sg.user_settings_get_entry('-Editor Program-', '')
|
||||
demo_path = sg.user_settings_get_entry('-demos folder-')
|
||||
git_demo_path = sg.user_settings_get_entry('-github folder-')
|
||||
github_program = sg.user_settings_get_entry('-GitHub Program-')
|
||||
editor_program = sg.user_settings_get_entry('-Editor Program-')
|
||||
demo_files, git_files = get_demo_git_files()
|
||||
window.close()
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/python3
|
||||
version = __version__ = "4.30.0.11 Unreleased\nAdded ability to set icon for popup_get_file when icon is set as parameter, changed __version__ to be same as 'ver' (the shortened version number), added Window.set_cursor, changed install to use version instead of __version__, changed back __version__ to be the long-form of the version number so that installs from GitHub will work again, trying another version change, Multiline.print (and cprint) now autoscrolls, additional check for combo update to allow setting both disabled & readonly parms, docstring fix for Multiline.update, added main_get_debug_data, reformatted look and feel table, fixed spelling error suppress_popup"
|
||||
version = __version__ = "4.30.0.12 Unreleased\nAdded ability to set icon for popup_get_file when icon is set as parameter, changed __version__ to be same as 'ver' (the shortened version number), added Window.set_cursor, changed install to use version instead of __version__, changed back __version__ to be the long-form of the version number so that installs from GitHub will work again, trying another version change, Multiline.print (and cprint) now autoscrolls, additional check for combo update to allow setting both disabled & readonly parms, docstring fix for Multiline.update, added main_get_debug_data, reformatted look and feel table, fixed spelling error suppress_popup, None as initial value for Input element treated as ''"
|
||||
|
||||
__version__ = version.split()[0] # For PEP 396 and PEP 345
|
||||
|
||||
|
@ -1170,7 +1170,7 @@ class InputText(Element):
|
|||
:param metadata: User metadata that can be set to ANYTHING
|
||||
:type metadata: (Any)
|
||||
"""
|
||||
self.DefaultText = default_text
|
||||
self.DefaultText = default_text if default_text is not None else ''
|
||||
self.PasswordCharacter = password_char
|
||||
bg = background_color if background_color is not None else DEFAULT_INPUT_ELEMENTS_COLOR
|
||||
fg = text_color if text_color is not None else DEFAULT_INPUT_TEXT_COLOR
|
||||
|
@ -13928,8 +13928,8 @@ def get_globals():
|
|||
# Predefined settings that will change the colors and styles #
|
||||
# of the elements. #
|
||||
##############################################################
|
||||
LOOK_AND_FEEL_TABLE =\
|
||||
{"SystemDefault": {"BACKGROUND": COLOR_SYSTEM_DEFAULT,"TEXT": COLOR_SYSTEM_DEFAULT,"INPUT": COLOR_SYSTEM_DEFAULT,"TEXT_INPUT": COLOR_SYSTEM_DEFAULT,"SCROLL": COLOR_SYSTEM_DEFAULT,"BUTTON": OFFICIAL_PYSIMPLEGUI_BUTTON_COLOR,"PROGRESS": COLOR_SYSTEM_DEFAULT,"BORDER": 1,"SLIDER_DEPTH": 1,"PROGRESS_DEPTH": 0,},
|
||||
LOOK_AND_FEEL_TABLE = {
|
||||
"SystemDefault": {"BACKGROUND": COLOR_SYSTEM_DEFAULT,"TEXT": COLOR_SYSTEM_DEFAULT,"INPUT": COLOR_SYSTEM_DEFAULT,"TEXT_INPUT": COLOR_SYSTEM_DEFAULT,"SCROLL": COLOR_SYSTEM_DEFAULT,"BUTTON": OFFICIAL_PYSIMPLEGUI_BUTTON_COLOR,"PROGRESS": COLOR_SYSTEM_DEFAULT,"BORDER": 1,"SLIDER_DEPTH": 1,"PROGRESS_DEPTH": 0,},
|
||||
"SystemDefaultForReal": {"BACKGROUND": COLOR_SYSTEM_DEFAULT,"TEXT": COLOR_SYSTEM_DEFAULT,"INPUT": COLOR_SYSTEM_DEFAULT,"TEXT_INPUT": COLOR_SYSTEM_DEFAULT,"SCROLL": COLOR_SYSTEM_DEFAULT,"BUTTON": COLOR_SYSTEM_DEFAULT,"PROGRESS": COLOR_SYSTEM_DEFAULT,"BORDER": 1,"SLIDER_DEPTH": 1,"PROGRESS_DEPTH": 0,},
|
||||
"SystemDefault1": {"BACKGROUND": COLOR_SYSTEM_DEFAULT,"TEXT": COLOR_SYSTEM_DEFAULT,"INPUT": COLOR_SYSTEM_DEFAULT,"TEXT_INPUT": COLOR_SYSTEM_DEFAULT,"SCROLL": COLOR_SYSTEM_DEFAULT,"BUTTON": COLOR_SYSTEM_DEFAULT,"PROGRESS": COLOR_SYSTEM_DEFAULT,"BORDER": 1,"SLIDER_DEPTH": 1,"PROGRESS_DEPTH": 0,},
|
||||
"Material1": {"BACKGROUND": "#E3F2FD","TEXT": "#000000","INPUT": "#86A8FF","TEXT_INPUT": "#000000","SCROLL": "#86A8FF","BUTTON": ("#FFFFFF", "#5079D3"),"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE,"BORDER": 0,"SLIDER_DEPTH": 0,"PROGRESS_DEPTH": 0,"ACCENT1": "#FF0266","ACCENT2": "#FF5C93","ACCENT3": "#C5003C",},
|
||||
|
|
Loading…
Reference in New Issue