MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / _global_settings_get_watermark_info

Function _global_settings_get_watermark_info

PySimpleGUI/PySimpleGUI.py:26065–26090  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26063
26064
26065def _global_settings_get_watermark_info():
26066 if (not pysimplegui_user_settings.get('-watermark-', False) and not Window._watermark_temp_forced) or (pysimplegui_user_settings.get('-watermark5-', True)):
26067 Window._watermark = None
26068 return
26069 watermark_disabled = pysimplegui_user_settings.get('-watermark5-', True)
26070 forced = Window._watermark_temp_forced
26071 prefix_text = pysimplegui_user_settings.get('-watermark text-', '')
26072 ver_text = __version__ if pysimplegui_user_settings.get('-watermark ver-', False if not forced else True) or forced else ''
26073 framework_ver_text = ' Tk' + framework_version if pysimplegui_user_settings.get('-watermark framework ver-', False if not forced else True) or forced else ''
26074 python_ver_text = ' P{}.{}.{}'.format(sys.version_info.major, sys.version_info.minor, sys.version_info.micro)
26075 watermark_font = pysimplegui_user_settings.get('-watermark font-', '_ 9 bold')
26076 # background_color = pysimplegui_user_settings.get('-watermark bg color-', 'window.BackgroundColor')
26077 user_text = Window._watermark_user_text
26078
26079 if user_text:
26080 text = str(user_text)
26081 else:
26082 text = prefix_text + ver_text + framework_ver_text + python_ver_text
26083 python_int_path = os.path.dirname(sys.executable)
26084 psg_path = os.path.dirname(__file__)
26085
26086 if python_int_path not in psg_path:
26087 colors = 'white on purple'
26088
26089 if not watermark_disabled:
26090 Window._watermark = lambda window: [Column([[Text(text, font=watermark_font, background_color= window.BackgroundColor), ]])]
26091
26092
26093

Callers 5

main_watermark_onFunction · 0.85
main_watermark_offFunction · 0.85
_convert_window_to_tkFunction · 0.85
PySimpleGUI.pyFile · 0.85

Calls 3

ColumnClass · 0.85
TextClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected