mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-25 21:59:19 +00:00
gui/macapp: improve 'about' box
adds exactly 1 metric dollop of professionalism to the previously rather amateurish looking about box.
This commit is contained in:
parent
6763df16f1
commit
63ba26a445
@ -19,6 +19,7 @@ from allmydata import client
|
|||||||
from allmydata.gui.confwiz import ConfWizApp, ACCOUNT_PAGE, DEFAULT_SERVER_URL
|
from allmydata.gui.confwiz import ConfWizApp, ACCOUNT_PAGE, DEFAULT_SERVER_URL
|
||||||
from allmydata.scripts.common import get_aliases
|
from allmydata.scripts.common import get_aliases
|
||||||
import amdicon
|
import amdicon
|
||||||
|
import amdlogo
|
||||||
|
|
||||||
DEFAULT_FUSE_TIMEOUT = 300
|
DEFAULT_FUSE_TIMEOUT = 300
|
||||||
|
|
||||||
@ -192,7 +193,8 @@ MOUNT_ID = wx.NewId()
|
|||||||
|
|
||||||
class SplashFrame(wx.Frame):
|
class SplashFrame(wx.Frame):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
wx.Frame.__init__(self, None, -1, 'Allmydata')
|
no_resz = wx.DEFAULT_FRAME_STYLE & ~ (wx.MINIMIZE_BOX|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX)
|
||||||
|
wx.Frame.__init__(self, None, -1, 'Allmydata', style=no_resz)
|
||||||
|
|
||||||
self.SetSizeHints(100, 100, 600, 800)
|
self.SetSizeHints(100, 100, 600, 800)
|
||||||
self.SetIcon(amdicon.getIcon())
|
self.SetIcon(amdicon.getIcon())
|
||||||
@ -219,19 +221,37 @@ class SplashPanel(wx.Panel):
|
|||||||
wx.Panel.__init__(self, parent, -1)
|
wx.Panel.__init__(self, parent, -1)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
|
|
||||||
|
hbox = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
vbox = wx.BoxSizer(wx.VERTICAL)
|
||||||
self.sizer = wx.BoxSizer(wx.VERTICAL)
|
self.sizer = wx.BoxSizer(wx.VERTICAL)
|
||||||
|
|
||||||
|
self.icon = wx.StaticBitmap(self, -1, amdlogo.getBitmap())
|
||||||
self.label = wx.StaticText(self, -1, 'Allmydata')
|
self.label = wx.StaticText(self, -1, 'Allmydata')
|
||||||
font = self.label.GetFont()
|
bigfont = self.label.GetFont()
|
||||||
font.SetPointSize(26)
|
bigfont.SetPointSize(26)
|
||||||
self.label.SetFont(font)
|
smlfont = self.label.GetFont()
|
||||||
self.ver_label = wx.StaticText(self, -1, str(allmydata.__version__))
|
smlfont.SetPointSize(10)
|
||||||
self.ok = wx.Button(self, -1, 'Ok')
|
self.label.SetFont(bigfont)
|
||||||
self.Bind(wx.EVT_BUTTON, on_close, self.ok)
|
ver = "Version 3.0 (%s)" % (allmydata.__version__,)
|
||||||
self.sizer.Add(self.label, 0, wx.CENTER | wx.ALL, 2)
|
self.ver_label = wx.StaticText(self, -1, ver)
|
||||||
self.sizer.Add(self.ver_label, 0, wx.CENTER | wx.ALL, 2)
|
self.ver_label.SetFont(smlfont)
|
||||||
self.sizer.Add(wx.Size(42,42), 1, wx.EXPAND | wx.ALL, 2)
|
copy = u"Copyright \N{COPYRIGHT SIGN} 2004-2008 Allmydata Inc.,"
|
||||||
self.sizer.Add(self.ok, 0, wx.CENTER | wx.ALL, 2)
|
self.copy_label = wx.StaticText(self, -1, copy)
|
||||||
|
self.copy_label.SetFont(smlfont)
|
||||||
|
self.res_label = wx.StaticText(self, -1, "All Rights Reserved.")
|
||||||
|
self.res_label.SetFont(smlfont)
|
||||||
|
##self.ok = wx.Button(self, -1, 'Ok')
|
||||||
|
##self.Bind(wx.EVT_BUTTON, on_close, self.ok)
|
||||||
|
hbox.Add(self.icon, 0, wx.CENTER | wx.ALL, 2)
|
||||||
|
vbox.Add(self.label, 0, wx.CENTER | wx.ALL, 2)
|
||||||
|
vbox.Add(self.ver_label, 0, wx.CENTER | wx.ALL, 2)
|
||||||
|
hbox.Add(vbox)
|
||||||
|
self.sizer.Add(hbox)
|
||||||
|
self.sizer.Add(wx.Size(8,8), 1, wx.EXPAND | wx.ALL, 2)
|
||||||
|
self.sizer.Add(self.copy_label, 0, wx.CENTER | wx.ALL, 2)
|
||||||
|
self.sizer.Add(self.res_label, 0, wx.CENTER | wx.ALL, 2)
|
||||||
|
#self.sizer.Add(wx.Size(42,42), 1, wx.EXPAND | wx.ALL, 2)
|
||||||
|
##self.sizer.Add(self.ok, 0, wx.CENTER | wx.ALL, 2)
|
||||||
self.SetSizer(self.sizer)
|
self.SetSizer(self.sizer)
|
||||||
self.SetAutoLayout(True)
|
self.SetAutoLayout(True)
|
||||||
|
|
||||||
@ -372,6 +392,7 @@ class MacGuiApp(wx.App):
|
|||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
try:
|
try:
|
||||||
self.frame = SplashFrame()
|
self.frame = SplashFrame()
|
||||||
|
self.frame.CenterOnScreen()
|
||||||
self.frame.Show(True)
|
self.frame.Show(True)
|
||||||
self.SetTopWindow(self.frame)
|
self.SetTopWindow(self.frame)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user