MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / _mac_should_apply_notitlebar_patch

Function _mac_should_apply_notitlebar_patch

PySimpleGUI/PySimpleGUI.py:23564–23583  ·  view source on GitHub ↗

Uses a combination of the tkinter version number and the setting from the global settings to determine if the notitlebar patch should be applied :return: True if should apply the no titlebar patch on the Mac :rtype: (bool)

()

Source from the content-addressed store, hash-verified

23562
23563
23564def _mac_should_apply_notitlebar_patch():
23565 """
23566 Uses a combination of the tkinter version number and the setting from the global settings
23567 to determine if the notitlebar patch should be applied
23568
23569 :return: True if should apply the no titlebar patch on the Mac
23570 :rtype: (bool)
23571 """
23572
23573 if not running_mac():
23574 return False
23575
23576 try:
23577 tver = [int(n) for n in framework_version.split('.')]
23578 if tver[0] == 8 and tver[1] == 6 and tver[2] < 10 and ENABLE_MAC_NOTITLEBAR_PATCH:
23579 return True
23580 except Exception as e:
23581 warnings.warn('Exception while trying to parse tkinter version {} Error = {}'.format(framework_version, e), UserWarning)
23582
23583 return False
23584
23585
23586def _mac_should_set_alpha_to_99():

Callers 4

showtipMethod · 0.85
_no_titlebar_setupFunction · 0.85
StartupTKFunction · 0.85
main_mac_feature_controlFunction · 0.85

Calls 1

running_macFunction · 0.85

Tested by

no test coverage detected