-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabout_dlg.py
56 lines (49 loc) · 2 KB
/
about_dlg.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
# About Dialog
# Copyright (C) 2022 mazen428, mohamedSulaimanAlmarzooqi
# This program is free software:
# you can redistribute it and/or modify it under the terms of the GNU General Public License 3.0 or later
# See the file LICENSE for more details.
import wx
from link import LinkCtrl
about_text = """GCResizer.
Version: 1.1.
Copyright \u00a9 2022 mazen428, mohamedSulaimanAlmarzooqi
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
"""
class about(wx.Dialog):
def __init__(self, parent):
super().__init__(
parent,
title="About",
style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER,
size=(800, 600),
)
sizer = wx.BoxSizer(wx.VERTICAL)
text = wx.TextCtrl(
self,
value=about_text,
style=wx.TE_READONLY | wx.TE_MULTILINE | wx.TE_RICH2,
size=(500, 500),
)
sizer.Add(text, 0, wx.ALL | wx.EXPAND, 10)
link_sizer = wx.BoxSizer(wx.HORIZONTAL)
link_sizer.Add(
LinkCtrl(
self, label="Homepage", url="https://github.com/mazen428/GCResizer"
)
)
link_sizer.Add(
LinkCtrl(
self, label="License", url="https://www.gnu.org/licenses/gpl-3.0.txt"
)
)
sizer.Add(link_sizer, 0, wx.ALL, 5)
sizer.Add(wx.Button(self, wx.ID_CLOSE))
self.Bind(
wx.EVT_BUTTON, lambda event: self.EndModal(wx.ID_CLOSE), id=wx.ID_CLOSE
)
self.SetSizer(sizer)
self.SetEscapeId(wx.ID_CLOSE)
sizer.Fit(self)
self.Layout()