| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- """
- This file is part of RuneOptimizer.
- RuneOptimizer 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.
- RuneOptimizer 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.
- You should have received a copy of the GNU General Public License along with
- RuneOptimizer. If not, see <https://www.gnu.org/licenses/>.
- """
- class PanelInfo(wx.Panel):
- """
- The panel that shows info about the app.
-
- Static content, just some labels.
- """
- def __init__(self, parent, id=wx.ID_ANY):
- """Initializes the panel.
- Sets up all the widgets.
- Parameters
- ----------
- parent : wx.*
- Panel parent.
- id : int, optional
- ID for the panel (default wx.ID_ANY).
- """
- # Parent constructor
- wx.Panel.__init__(self, parent=parent, id=id)
- # Prepare some fonts
- title_font = wx.Font(
- pointSize=14, family=wx.FONTFAMILY_DEFAULT,
- style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_BOLD
- )
- label_font = wx.Font(
- pointSize=10, family=wx.FONTFAMILY_DEFAULT,
- style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_NORMAL
- )
- content_font = wx.Font(
- pointSize=10, family=wx.FONTFAMILY_DEFAULT,
- style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_BOLD
- )
- wx.StaticText(
- parent=self, id=wx.ID_ANY, label=app_info["name"],
- pos=(30, 30), size=(400, 40)
- ).SetFont(title_font)
- wx.StaticText(
- parent=self, id=wx.ID_ANY, label="Application version:",
- pos=(40, 90), size=(150, 30), style=wx.ALIGN_RIGHT
- ).SetFont(label_font)
- wx.StaticText(
- parent=self, id=wx.ID_ANY, label=app_info["app_version"],
- pos=(200, 90), size=(400, 30)
- ).SetFont(content_font)
- wx.StaticText(
- parent=self, id=wx.ID_ANY, label="GUI version:",
- pos=(40, 120), size=(150, 30), style=wx.ALIGN_RIGHT
- ).SetFont(label_font)
- wx.StaticText(
- parent=self, id=wx.ID_ANY, label=app_info["gui_version"],
- pos=(200, 120), size=(400, 30)
- ).SetFont(content_font)
- wx.StaticText(
- parent=self, id=wx.ID_ANY, label="Author:",
- pos=(40, 150), size=(150, 30), style=wx.ALIGN_RIGHT
- ).SetFont(label_font)
- wx.StaticText(
- parent=self, id=wx.ID_ANY,
- label=app_info["author"] + " <" +app_info["author_mail"] + ">",
- pos=(200, 150), size=(400, 30)
- ).SetFont(content_font)
- y = 180
- for name, url in app_info["url"].items():
- wx.StaticText(
- parent=self, id=wx.ID_ANY, label=name + ":",
- pos=(40, y), size=(150, 30), style=wx.ALIGN_RIGHT
- ).SetFont(label_font)
- wx.adv.HyperlinkCtrl(
- parent=self, id=wx.ID_ANY, label=url,
- pos=(200-8, y-5), size=(400, 30), style=wx.adv.HL_ALIGN_LEFT
- ).SetFont(content_font)
- y += 30
|