mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Switch to a sizer in the superdoodle about box
This commit is contained in:
@@ -18,6 +18,7 @@ import wx
|
|||||||
import wx.html
|
import wx.html
|
||||||
from wx.lib import buttons # for generic button classes
|
from wx.lib import buttons # for generic button classes
|
||||||
from doodle import DoodleWindow
|
from doodle import DoodleWindow
|
||||||
|
import version
|
||||||
|
|
||||||
from wx.lib.mixins.inspection import InspectionMixin
|
from wx.lib.mixins.inspection import InspectionMixin
|
||||||
|
|
||||||
@@ -349,7 +350,7 @@ class DoodleAbout(wx.Dialog):
|
|||||||
|
|
||||||
text = '''
|
text = '''
|
||||||
<html>
|
<html>
|
||||||
<body bgcolor="#ACAA60">
|
<body bgcolor="#60acac">
|
||||||
<center><table bgcolor="#455481" width="100%%" cellspacing="0"
|
<center><table bgcolor="#455481" width="100%%" cellspacing="0"
|
||||||
cellpadding="0" border="1">
|
cellpadding="0" border="1">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -369,7 +370,7 @@ instructions: </p>
|
|||||||
|
|
||||||
<p><b>SuperDoodle</b> and <b>wxPython</b> are brought to you by
|
<p><b>SuperDoodle</b> and <b>wxPython</b> are brought to you by
|
||||||
<b>Robin Dunn</b> and <b>Total Control Software</b>, Copyright
|
<b>Robin Dunn</b> and <b>Total Control Software</b>, Copyright
|
||||||
© 1997-2011.</p>
|
© 1997-2019.</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
'''
|
'''
|
||||||
@@ -379,29 +380,18 @@ instructions: </p>
|
|||||||
size=(420, 380) )
|
size=(420, 380) )
|
||||||
|
|
||||||
html = wx.html.HtmlWindow(self, -1)
|
html = wx.html.HtmlWindow(self, -1)
|
||||||
import version
|
|
||||||
html.SetPage(self.text % version.VERSION)
|
html.SetPage(self.text % version.VERSION)
|
||||||
button = wx.Button(self, wx.ID_OK, "Okay")
|
button = wx.Button(self, wx.ID_OK, "Okay")
|
||||||
|
|
||||||
# constraints for the html window
|
# Set up the layout with a Sizer
|
||||||
lc = wx.LayoutConstraints()
|
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||||
lc.top.SameAs(self, wx.Top, 5)
|
sizer.Add(html, wx.SizerFlags(1).Expand().Border(wx.ALL, 5))
|
||||||
lc.left.SameAs(self, wx.Left, 5)
|
sizer.Add(button, wx.SizerFlags(0).Align(wx.ALIGN_CENTER).Border(wx.BOTTOM, 5))
|
||||||
lc.bottom.SameAs(button, wx.Top, 5)
|
self.SetSizer(sizer)
|
||||||
lc.right.SameAs(self, wx.Right, 5)
|
|
||||||
html.SetConstraints(lc)
|
|
||||||
|
|
||||||
# constraints for the button
|
|
||||||
lc = wx.LayoutConstraints()
|
|
||||||
lc.bottom.SameAs(self, wx.Bottom, 5)
|
|
||||||
lc.centreX.SameAs(self, wx.CentreX)
|
|
||||||
lc.width.AsIs()
|
|
||||||
lc.height.AsIs()
|
|
||||||
button.SetConstraints(lc)
|
|
||||||
|
|
||||||
self.SetAutoLayout(True)
|
|
||||||
self.Layout()
|
self.Layout()
|
||||||
|
|
||||||
self.CentreOnParent(wx.BOTH)
|
self.CentreOnParent(wx.BOTH)
|
||||||
|
wx.CallAfter(button.SetFocus)
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user