""" 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 . """ class PanelInfo(wx.Panel): """ The panel that shows info about the app. """ 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 titleFont = wx.Font( pointSize=14, family=wx.FONTFAMILY_DEFAULT, style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_BOLD ) labelFont = wx.Font( pointSize=10, family=wx.FONTFAMILY_DEFAULT, style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_NORMAL ) contentFont = wx.Font( pointSize=10, family=wx.FONTFAMILY_DEFAULT, style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_BOLD ) titleLabel = wx.StaticText( parent=self, id=wx.ID_ANY, label=app_info["name"], pos=(30, 30), size=(400, 40) ) titleLabel.SetFont(titleFont) text = wx.StaticText( parent=self, id=wx.ID_ANY, label="Application version:", pos=(40, 90), size=(150, 30), style=wx.ALIGN_RIGHT ) text.SetFont(labelFont) text = wx.StaticText( parent=self, id=wx.ID_ANY, label=app_info["app_version"], pos=(200, 90), size=(400, 30) ) text.SetFont(contentFont) text = wx.StaticText( parent=self, id=wx.ID_ANY, label="GUI version:", pos=(40, 120), size=(150, 30), style=wx.ALIGN_RIGHT ) text.SetFont(labelFont) text = wx.StaticText( parent=self, id=wx.ID_ANY, label=app_info["gui_version"], pos=(200, 120), size=(400, 30) ) text.SetFont(contentFont) text = wx.StaticText( parent=self, id=wx.ID_ANY, label="Author:", pos=(40, 150), size=(150, 30), style=wx.ALIGN_RIGHT ) text.SetFont(labelFont) text = wx.StaticText( parent=self, id=wx.ID_ANY, label=app_info["author"] + " <" +app_info["author_mail"] + ">", pos=(200, 150), size=(400, 30) ) text.SetFont(contentFont) y = 180 for name, url in app_info["url"].items(): text = wx.StaticText( parent=self, id=wx.ID_ANY, label=name + ":", pos=(40, y), size=(150, 30), style=wx.ALIGN_RIGHT ) text.SetFont(labelFont) text = 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 ) text.SetFont(contentFont) y += 30