Fix stretchspacers

This commit is contained in:
blitzmann
2017-11-24 17:23:04 -05:00
parent 53936a3e66
commit 337f0a9c8a
11 changed files with 17 additions and 19 deletions

View File

@@ -60,8 +60,7 @@ class FighterView(wx.Panel):
mainSizer.Add(self.fighterDisplay, 1, wx.EXPAND, 0)
textSizer = wx.BoxSizer(wx.HORIZONTAL)
# @todo pheonix: Add spacer doesn't take a tuple anymore, using int of 0, and other parameters are killed off
textSizer.AddSpacer(0)
textSizer.AddStretchSpacer()
for x in self.labels:
lbl = wx.StaticText(self, wx.ID_ANY, x.capitalize())
@@ -76,7 +75,7 @@ class FighterView(wx.Panel):
lbl = wx.StaticText(self, wx.ID_ANY, "0")
setattr(self, "label%sTotal" % (x.capitalize()), lbl)
textSizer.Add(lbl, 0, wx.ALIGN_CENTER)
textSizer.AddSpacer(0)
textSizer.AddStretchSpacer()
mainSizer.Add(textSizer, 0, wx.EXPAND, 5)

View File

@@ -41,12 +41,12 @@ class ImplantView(wx.Panel):
mainSizer.Add(self.implantDisplay, 1, wx.EXPAND, 0)
radioSizer = wx.BoxSizer(wx.HORIZONTAL)
radioSizer.AddSpacer(0)
radioSizer.AddStretchSpacer()
self.rbFit = wx.RadioButton(self, id=wx.ID_ANY, label="Use Fit-specific Implants", style=wx.RB_GROUP)
self.rbChar = wx.RadioButton(self, id=wx.ID_ANY, label="Use Character Implants")
radioSizer.Add(self.rbFit, 0, wx.ALL, 5)
radioSizer.Add(self.rbChar, 0, wx.ALL, 5)
radioSizer.AddSpacer(0)
radioSizer.AddStretchSpacer()
mainSizer.Add(radioSizer, 0, wx.EXPAND, 5)

View File

@@ -80,7 +80,7 @@ class DummyView(PreferenceView):
def initFooter(self, panel):
footerSizer = wx.BoxSizer(wx.HORIZONTAL)
footerSizer.AddSpacer(0)
footerSizer.AddStretchSpacer()
self.btnRestore = wx.Button(panel, wx.ID_ANY, "Restore", wx.DefaultPosition, wx.DefaultSize, 0)
self.btnRestore.Enable(False)

View File

@@ -76,7 +76,7 @@ class PFGeneralPref(PreferenceView):
mainSizer.Add(self.m_staticline3, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
btnSizer = wx.BoxSizer(wx.VERTICAL)
btnSizer.AddSpacer(0)
btnSizer.AddStretchSpacer()
self.btnDeleteDamagePatterns = wx.Button(panel, wx.ID_ANY, "Delete All Damage Pattern Profiles", wx.DefaultPosition, wx.DefaultSize, 0)
btnSizer.Add(self.btnDeleteDamagePatterns, 0, wx.ALL, 5)

View File

@@ -139,7 +139,7 @@ class PFNetworkPref(PreferenceView):
mainSizer.Add(self.stPSAutoDetected, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
btnSizer = wx.BoxSizer(wx.HORIZONTAL)
btnSizer.AddSpacer(0)
btnSizer.AddStretchSpacer()
self.btnApply = wx.Button(panel, wx.ID_ANY, "Apply Proxy Settings", wx.DefaultPosition, wx.DefaultSize, 0)

View File

@@ -52,11 +52,11 @@ class PFUpdatePref(PreferenceView):
"You can choose to reset notification suppression for this release, "
"or download the new release from GitHub.")
self.versionSizer.AddSpacer(0)
self.versionSizer.AddStretchSpacer()
self.versionSizer.Add(wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL),
0, wx.EXPAND, 5)
self.versionSizer.AddSpacer(0)
self.versionSizer.AddStretchSpacer()
self.versionSizer.Add(self.versionTitle, 0, wx.EXPAND, 5)
self.versionDesc = wx.StaticText(panel, wx.ID_ANY, self.versionInfo, wx.DefaultPosition, wx.DefaultSize, 0)

View File

@@ -102,7 +102,7 @@ class ResourcesViewFull(StatsView):
panel = "full"
base = sizerResources
sizer.AddSpacer(0)
sizer.AddStretchSpacer()
# Turrets & launcher hardslots display
tooltipText = {"turret": "Turret hardpoints", "launcher": "Launcher hardpoints", "drones": "Drones active",
"fighter": "Fighter squadrons active", "calibration": "Calibration"}
@@ -134,7 +134,7 @@ class ResourcesViewFull(StatsView):
# Hack - We add a spacer after each thing, but we are always hiding something. The spacer is stil there.
# This way, we only have one space after the drones/fighters
if type_ != "drones":
sizer.AddSpacer(0)
sizer.AddStretchSpacer()
gauge_font = wx.Font(fonts.NORMAL, wx.SWISS, wx.NORMAL, wx.NORMAL, False)

View File

@@ -54,7 +54,7 @@ class BaseImplantEditorView(wx.Panel):
pmainSizer.Add(availableSizer, 1, wx.ALL | wx.EXPAND, 5)
buttonSizer = wx.BoxSizer(wx.VERTICAL)
buttonSizer.AddSpacer(0)
buttonSizer.AddStretchSpacer()
self.btnAdd = GenBitmapButton(self, wx.ID_ADD, BitmapLoader.getBitmap("fit_add_small", "gui"),
style=wx.BORDER_NONE)
@@ -64,7 +64,7 @@ class BaseImplantEditorView(wx.Panel):
style=wx.BORDER_NONE)
buttonSizer.Add(self.btnRemove, 0)
buttonSizer.AddSpacer(0)
buttonSizer.AddStretchSpacer()
pmainSizer.Add(buttonSizer, 0, wx.EXPAND, 0)
characterImplantSizer = wx.BoxSizer(wx.VERTICAL)

View File

@@ -345,7 +345,7 @@ class SkillTreeView(wx.Panel):
bSizerButtons.Add(self.btnSecStatus, 0, wx.ALL, 5)
bSizerButtons.AddSpacer(0)
bSizerButtons.AddStretchSpacer()
importExport = (("Import", wx.ART_FILE_OPEN, "from"),
("Export", wx.ART_FILE_SAVE_AS, "to"))

View File

@@ -46,7 +46,7 @@ class PreferenceDialog(wx.Dialog):
mainSizer.Add(self.m_staticline2, 0, wx.EXPAND, 5)
btnSizer = wx.BoxSizer(wx.HORIZONTAL)
btnSizer.AddSpacer(0)
btnSizer.AddStretchSpacer()
self.btnOK = wx.Button(self, wx.ID_ANY, "OK", wx.DefaultPosition, wx.DefaultSize, 0)
btnSizer.Add(self.btnOK, 0, wx.ALL, 5)
mainSizer.Add(btnSizer, 0, wx.EXPAND, 5)

View File

@@ -70,10 +70,9 @@ class UpdateDialog(wx.Dialog):
self.versionText.SetFont(wx.Font(12, 74, 90, 90, False))
versionSizer.Add(self.versionText, 1, wx.ALL, 5)
versionSizer.AddSpacer(15)
mainSizer.Add(versionSizer, 0, wx.EXPAND, 5)
mainSizer.AddSpacer(0)
mainSizer.Add(versionSizer, 0, wx.EXPAND, 0)
releaseDate = dateutil.parser.parse(self.releaseInfo['published_at'])
notesSizer = wx.BoxSizer(wx.HORIZONTAL)