-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvss_about.py
101 lines (89 loc) · 2.53 KB
/
vss_about.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import PySimpleGUI as sg
from vss_defaults import VSS_APPLICATION_VERSION, VSS_APPLICATION_NAME, VSS_APPLICATION_DESCRIPTION
from vss_utils.vss_utilities import center_window, get_os_information
def vss_about_window(theme='DarkBlue'):
"""
Generates an 'About VSS' window when this function is called.
Args:
None
Returns:
None
"""
os_info = get_os_information()
sg.theme(theme)
sg.set_options(
window_location = (0,0)
,element_padding=(5,5)
#,font = 'Franklin 14'
)
scrollable_layout = [[
sg.Text(
VSS_APPLICATION_DESCRIPTION,
font='Segoe 12',
justification='center',
expand_x=True
),
]]
layout = [
[
sg.Text(
f'About {VSS_APPLICATION_NAME}',
justification='center',
font='Segoe 20',
expand_x=True
)
],
[
sg.Text(
f'Version: {VSS_APPLICATION_VERSION}',
justification='center',
font='Segoe 12',
expand_x=True
)
],
[
sg.Text(
f'OS: {os_info.system} {os_info.release}, version: {os_info.version}, machine type: {os_info.machine}',
justification='center',
font='Segoe 12',
expand_x=True
)
],
[
sg.Text(
f'Author: Joseph Armstrong',
justification='center',
font='Segoe 12',
expand_x=True
)
],
[
sg.Column(
scrollable_layout,
scrollable=True,
vertical_scroll_only=True,
background_color=sg.theme_input_background_color(),
expand_x=True,
expand_y=True
)
],
[sg.Push(),sg.Button('Exit',key='-OK-',size=(8,1),bind_return_key=True),sg.Push()]
]
window = sg.Window(
'Visual Sports Stuido',
layout,
size=(600,360),
resizable=False,
no_titlebar=True,
finalize=True,
grab_anywhere=True,
keep_on_top=True
)
center_window(window)
while True: # Event loop
event, values = window.read()
if event == sg.WIN_CLOSED or event == 'Exit' or event == '-OK-':
break
window.close()
if __name__ == "__main__":
vss_about_window()