-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demo Program to show new Watermark features
- Loading branch information
1 parent
d447633
commit 3b7a17f
Showing
2 changed files
with
127 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
import PySimpleGUI as sg | ||
|
||
""" | ||
Demo - Watermarking all windows | ||
Watermarking windows can be done in 4.60.0.160 and greater. It's a very simple mechanism for now. | ||
The option is normally set in the Global Settings control panel. However, you can "Force" the watermark | ||
on all windows by setting the Window paramter watermark=True on any window you create and from then on | ||
all windows will have the watermark. | ||
Copyright 2023 PySimpleGUI | ||
""" | ||
|
||
""" | ||
M"""""""`YM | ||
M mmmm. M | ||
M MMMMM M .d8888b. | ||
M MMMMM M 88' `88 | ||
M MMMMM M 88. .88 | ||
M MMMMM M `88888P' | ||
MMMMMMMMMMM | ||
M""MMM""MMM""M dP dP | ||
M MMM MMM M 88 88 | ||
M MMP MMP M .d8888b. d8888P .d8888b. 88d888b. 88d8b.d8b. .d8888b. 88d888b. 88 .dP | ||
M MM' MM' .M 88' `88 88 88ooood8 88' `88 88'`88'`88 88' `88 88' `88 88888" | ||
M `' . '' .MM 88. .88 88 88. ... 88 88 88 88 88. .88 88 88 `8b. | ||
M .d .dMMM `88888P8 dP `88888P' dP dP dP dP `88888P8 dP dP `YP | ||
MMMMMMMMMMMMMM | ||
""" | ||
|
||
layout = [ [sg.Text('No Watermark')], | ||
[sg.Button('Exit')] ] | ||
|
||
window = sg.Window('No Watermark', layout) | ||
|
||
while True: | ||
event, values = window.read() | ||
if event == sg.WIN_CLOSED or event == 'Exit': | ||
break | ||
|
||
window.close() | ||
|
||
|
||
""" | ||
MP""""""`MM dP | ||
M mmmmm..M 88 | ||
M. `YM dP dP .d8888b. d8888P .d8888b. 88d8b.d8b. | ||
MMMMMMM. M 88 88 Y8ooooo. 88 88ooood8 88'`88'`88 | ||
M. .MMM' M 88. .88 88 88 88. ... 88 88 88 | ||
Mb. .dM `8888P88 `88888P' dP `88888P' dP dP dP | ||
MMMMMMMMMMM .88 | ||
d8888P | ||
M""MMM""MMM""M dP dP | ||
M MMM MMM M 88 88 | ||
M MMP MMP M .d8888b. d8888P .d8888b. 88d888b. 88d8b.d8b. .d8888b. 88d888b. 88 .dP | ||
M MM' MM' .M 88' `88 88 88ooood8 88' `88 88'`88'`88 88' `88 88' `88 88888" | ||
M `' . '' .MM 88. .88 88 88. ... 88 88 88 88 88. .88 88 88 `8b. | ||
M .d .dMMM `88888P8 dP `88888P' dP dP dP dP `88888P8 dP dP `YP | ||
MMMMMMMMMMMMMM | ||
""" | ||
|
||
sg.set_options(watermark_text='') # noramlly not requird unless previously set by user | ||
|
||
layout = [ [sg.Text('System Provided Watermark')], | ||
[sg.Button('Exit')] ] | ||
|
||
window = sg.Window('System Watermark', layout, watermark=True) | ||
|
||
while True: | ||
event, values = window.read() | ||
if event == sg.WIN_CLOSED or event == 'Exit': | ||
break | ||
|
||
window.close() | ||
|
||
|
||
""" | ||
M""MMMMM""M | ||
M MMMMM M | ||
M MMMMM M .d8888b. .d8888b. 88d888b. | ||
M MMMMM M Y8ooooo. 88ooood8 88' `88 | ||
M `MMM' M 88 88. ... 88 | ||
Mb dM `88888P' `88888P' dP | ||
MMMMMMMMMMM | ||
M""MMM""MMM""M dP dP | ||
M MMM MMM M 88 88 | ||
M MMP MMP M .d8888b. d8888P .d8888b. 88d888b. 88d8b.d8b. .d8888b. 88d888b. 88 .dP | ||
M MM' MM' .M 88' `88 88 88ooood8 88' `88 88'`88'`88 88' `88 88' `88 88888" | ||
M `' . '' .MM 88. .88 88 88. ... 88 88 88 88 88. .88 88 88 `8b. | ||
M .d .dMMM `88888P8 dP `88888P' dP dP dP dP `88888P8 dP dP `YP | ||
MMMMMMMMMMMMMM | ||
""" | ||
|
||
sg.set_options(watermark_text='User Supplied Version 1.0') | ||
|
||
layout = [ [sg.Text('User Supplied Watermark')], | ||
[sg.Button('Exit')] ] | ||
|
||
window = sg.Window('User Supplied Watermark', layout, watermark=True) | ||
|
||
while True: | ||
event, values = window.read() | ||
if event == sg.WIN_CLOSED or event == 'Exit': | ||
break | ||
|
||
window.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters