Merge pull request #6377 from PySimpleGUI/Dev-latest

Dev latest
This commit is contained in:
PySimpleGUI 2023-05-14 12:22:52 -04:00 committed by GitHub
commit db1f02af2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 56 additions and 41 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/python3 #!/usr/bin/python3
version = __version__ = "4.61.0.177 Unreleased" version = __version__ = "4.61.0.179 Unreleased"
_change_log = """ _change_log = """
Changelog since 4.60.0 released to PyPI on 8-May-2022 Changelog since 4.60.0 released to PyPI on 8-May-2022
@ -424,6 +424,10 @@ _change_log = """
Improved linux distro detection Improved linux distro detection
4.61.0.177 4.61.0.177
Custom Titlebar - Support for disabling resizing (maximizing too), support for disable minimize and disable close Custom Titlebar - Support for disabling resizing (maximizing too), support for disable minimize and disable close
4.61.0.178
Input element - fix for bug with text color & logic wasn't quite right with the "read for disabled" stuff in the update as well as when making window
4.61.0.179
New Udemy coupon
""" """
__version__ = version.split()[0] # For PEP 396 and PEP 345 __version__ = version.split()[0] # For PEP 396 and PEP 345
@ -2519,11 +2523,25 @@ class Input(Element):
_error_popup_with_traceback('Error in Input.update - The window was closed') _error_popup_with_traceback('Error in Input.update - The window was closed')
return return
if background_color not in (None, COLOR_SYSTEM_DEFAULT):
self.TKEntry.configure(background=background_color)
self.BackgroundColor = background_color
if text_color not in (None, COLOR_SYSTEM_DEFAULT):
self.TKEntry.configure(fg=text_color)
self.TextColor = text_color
if disabled is True: if disabled is True:
self.TKEntry['state'] = 'readonly' if self.UseReadonlyForDisable else 'disabled' if self.UseReadonlyForDisable:
self.TKEntry.configure(fg=self.disabled_readonly_text_color)
self.TKEntry['state'] = 'readonly'
else:
self.TKEntry.configure(fg=self.TextColor)
self.TKEntry['state'] = 'disabled'
self.Disabled = True
elif disabled is False: elif disabled is False:
self.TKEntry['state'] = 'readonly' if self.ReadOnly else 'normal' self.TKEntry['state'] = 'normal'
self.Disabled = disabled if disabled is not None else self.Disabled self.TKEntry.configure(fg=self.TextColor)
self.Disabled = False
if readonly is True: if readonly is True:
self.TKEntry['state'] = 'readonly' self.TKEntry['state'] = 'readonly'
@ -2532,10 +2550,7 @@ class Input(Element):
if background_color not in (None, COLOR_SYSTEM_DEFAULT):
self.TKEntry.configure(background=background_color)
if text_color not in (None, COLOR_SYSTEM_DEFAULT):
self.TKEntry.configure(fg=text_color)
if value is not None: if value is not None:
if paste is not True: if paste is not True:
try: try:
@ -16730,7 +16745,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
element.TKEntry.configure(selectforeground=element.selected_text_color) element.TKEntry.configure(selectforeground=element.selected_text_color)
if element.disabled_readonly_background_color not in (None, COLOR_SYSTEM_DEFAULT): if element.disabled_readonly_background_color not in (None, COLOR_SYSTEM_DEFAULT):
element.TKEntry.config(readonlybackground=element.disabled_readonly_background_color) element.TKEntry.config(readonlybackground=element.disabled_readonly_background_color)
if element.disabled_readonly_text_color not in (None, COLOR_SYSTEM_DEFAULT): if element.disabled_readonly_text_color not in (None, COLOR_SYSTEM_DEFAULT) and element.Disabled:
element.TKEntry.config(fg=element.disabled_readonly_text_color) element.TKEntry.config(fg=element.disabled_readonly_text_color)
element.Widget.config(highlightthickness=0) element.Widget.config(highlightthickness=0)
@ -26647,7 +26662,7 @@ def main():
elif event == 'Get Text': elif event == 'Get Text':
popup_scrolled('Returned:', popup_get_text('Enter some text', keep_on_top=True)) popup_scrolled('Returned:', popup_get_text('Enter some text', keep_on_top=True))
elif event.startswith('-UDEMY-'): elif event.startswith('-UDEMY-'):
webbrowser.open_new_tab(r'https://www.udemy.com/course/pysimplegui/?couponCode=65DBBEA0EC4C3B093FD1') webbrowser.open_new_tab(r'https://www.udemy.com/course/pysimplegui/?couponCode=9AF99B123C49D51EB547')
elif event.startswith('-SPONSOR-'): elif event.startswith('-SPONSOR-'):
if webbrowser_available: if webbrowser_available:
webbrowser.open_new_tab(r'https://www.paypal.me/pythongui') webbrowser.open_new_tab(r'https://www.paypal.me/pythongui')
@ -26655,7 +26670,7 @@ def main():
if webbrowser_available: if webbrowser_available:
webbrowser.open_new_tab(r'https://www.buymeacoffee.com/PySimpleGUI') webbrowser.open_new_tab(r'https://www.buymeacoffee.com/PySimpleGUI')
elif event in ('-EMOJI-HEARTS-', '-HEART-', '-PYTHON HEARTS-'): elif event in ('-EMOJI-HEARTS-', '-HEART-', '-PYTHON HEARTS-'):
popup_scrolled("Oh look! It's a Udemy discount coupon!", '65DBBEA0EC4C3B093FD1', popup_scrolled("Oh look! It's a Udemy discount coupon!", '9AF99B123C49D51EB547',
'A personal message from Mike -- thank you so very much for supporting PySimpleGUI!', title='Udemy Coupon', image=EMOJI_BASE64_MIKE, keep_on_top=True) 'A personal message from Mike -- thank you so very much for supporting PySimpleGUI!', title='Udemy Coupon', image=EMOJI_BASE64_MIKE, keep_on_top=True)
elif event == 'Themes': elif event == 'Themes':

View File

@ -25,9 +25,9 @@
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
A2E4F6B1B75EC3D90133. 9AF99B123C49D51EB547.
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=A2E4F6B1B75EC3D90133','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=9AF99B123C49D51EB547','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>
@ -13685,15 +13685,15 @@ IMPORTANT - This method uses THREADS... this means you CANNOT make any PySimpleG
the function you provide with the exception of one function, Window.write_event_value. the function you provide with the exception of one function, Window.write_event_value.
``` ```
perform_long_operation(func, end_key) perform_long_operation(func, end_key = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| Any | func | A lambda or a function name with no parms | | Any | func | A lambda or a function name with no parms |
| Any | end_key | The key that will be generated when the function returns | | (Any or None) | end_key | Optional key that will be generated when the function returns |
| threading.Thread | **RETURN** | The id of the thread | threading.Thread | **RETURN** | The id of the thread
### read ### read
@ -13907,15 +13907,15 @@ IMPORTANT - This method uses THREADS... this means you CANNOT make any PySimpleG
the function you provide with the exception of one function, Window.write_event_value. the function you provide with the exception of one function, Window.write_event_value.
``` ```
start_thread(func, end_key) start_thread(func, end_key = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| Any | func | A lambda or a function name with no parms | | Any | func | A lambda or a function name with no parms |
| Any | end_key | The key that will be generated when the function returns | | (Any or None) | end_key | Optional key that will be generated when the function returns |
| threading.Thread | **RETURN** | The id of the thread | threading.Thread | **RETURN** | The id of the thread
### timer_get_active_timers ### timer_get_active_timers

View File

@ -25,9 +25,9 @@
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
65DBBEA0EC4C3B093FD1 9AF99B123C49D51EB547
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=65DBBEA0EC4C3B093FD1','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=9AF99B123C49D51EB547','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>

View File

@ -25,9 +25,9 @@
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
65DBBEA0EC4C3B093FD1 9AF99B123C49D51EB547
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=65DBBEA0EC4C3B093FD1','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=9AF99B123C49D51EB547','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>

View File

@ -9,8 +9,8 @@
<img src="https://www.dropbox.com/s/6wzf3ebmj97v4zs/PySimpleGUI-GitHub-Udemy-Course.png?raw=1" width=200 alt="PySimpleGUI Udemy Course"> <img src="https://www.dropbox.com/s/6wzf3ebmj97v4zs/PySimpleGUI-GitHub-Udemy-Course.png?raw=1" width=200 alt="PySimpleGUI Udemy Course">
</td> </td>
<td> <td>
<h5>apply coupon for discount:<br>65DBBEA0EC4C3B093FD1</h6> <h5>apply coupon for discount:<br>9AF99B123C49D51EB547</h6>
<a href="https://www.udemy.com/course/pysimplegui/?couponCode=65DBBEA0EC4C3B093FD1">click here to visit course page</a> <a href="https://www.udemy.com/course/pysimplegui/?couponCode=9AF99B123C49D51EB547">click here to visit course page</a>
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -9,8 +9,8 @@
<img src="https://www.dropbox.com/s/6wzf3ebmj97v4zs/PySimpleGUI-GitHub-Udemy-Course.png?raw=1" width=200 alt="PySimpleGUI Udemy Course"> <img src="https://www.dropbox.com/s/6wzf3ebmj97v4zs/PySimpleGUI-GitHub-Udemy-Course.png?raw=1" width=200 alt="PySimpleGUI Udemy Course">
</td> </td>
<td> <td>
<h5>apply coupon for discount:<br>65DBBEA0EC4C3B093FD1</h6> <h5>apply coupon for discount:<br>9AF99B123C49D51EB547</h6>
<a href="https://www.udemy.com/course/pysimplegui/?couponCode=65DBBEA0EC4C3B093FD1">click here to visit course page</a> <a href="https://www.udemy.com/course/pysimplegui/?couponCode=9AF99B123C49D51EB547">click here to visit course page</a>
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -52,9 +52,9 @@ HOW DO I INSERT IMAGES ???
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
65DBBEA0EC4C3B093FD1 9AF99B123C49D51EB547
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=65DBBEA0EC4C3B093FD1','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=9AF99B123C49D51EB547','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>

View File

@ -25,9 +25,9 @@
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
A2E4F6B1B75EC3D90133. 9AF99B123C49D51EB547.
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=A2E4F6B1B75EC3D90133','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=9AF99B123C49D51EB547','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>

View File

@ -25,9 +25,9 @@
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
A2E4F6B1B75EC3D90133. 9AF99B123C49D51EB547.
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=A2E4F6B1B75EC3D90133','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=9AF99B123C49D51EB547','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>
@ -13685,15 +13685,15 @@ IMPORTANT - This method uses THREADS... this means you CANNOT make any PySimpleG
the function you provide with the exception of one function, Window.write_event_value. the function you provide with the exception of one function, Window.write_event_value.
``` ```
perform_long_operation(func, end_key) perform_long_operation(func, end_key = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| Any | func | A lambda or a function name with no parms | | Any | func | A lambda or a function name with no parms |
| Any | end_key | The key that will be generated when the function returns | | (Any or None) | end_key | Optional key that will be generated when the function returns |
| threading.Thread | **RETURN** | The id of the thread | threading.Thread | **RETURN** | The id of the thread
### read ### read
@ -13907,15 +13907,15 @@ IMPORTANT - This method uses THREADS... this means you CANNOT make any PySimpleG
the function you provide with the exception of one function, Window.write_event_value. the function you provide with the exception of one function, Window.write_event_value.
``` ```
start_thread(func, end_key) start_thread(func, end_key = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| Any | func | A lambda or a function name with no parms | | Any | func | A lambda or a function name with no parms |
| Any | end_key | The key that will be generated when the function returns | | (Any or None) | end_key | Optional key that will be generated when the function returns |
| threading.Thread | **RETURN** | The id of the thread | threading.Thread | **RETURN** | The id of the thread
### timer_get_active_timers ### timer_get_active_timers

View File

@ -25,9 +25,9 @@
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
65DBBEA0EC4C3B093FD1 9AF99B123C49D51EB547
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=65DBBEA0EC4C3B093FD1','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=9AF99B123C49D51EB547','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>