From 70d52fd0b2b7a93349b92cf7ced690b7757fb5c1 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Thu, 20 Nov 2014 12:27:32 -0500 Subject: [PATCH] Moved price update info to header --- gui/builtinStatsViews/priceViewFull.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/gui/builtinStatsViews/priceViewFull.py b/gui/builtinStatsViews/priceViewFull.py index 63948983b..2aef192c8 100644 --- a/gui/builtinStatsViews/priceViewFull.py +++ b/gui/builtinStatsViews/priceViewFull.py @@ -41,7 +41,7 @@ class PriceViewFull(StatsView): self._cachedFittings = 0 self._cachedTotal = 0 - def OnTimer( self, event): + def OnTimer(self, event): if self._timerId == event.GetId(): if self._timerRuns >= self._timerRunsBeforeUpdate: self._timerRuns = 0 @@ -53,11 +53,12 @@ class PriceViewFull(StatsView): if self._timerIdUpdate == event.GetId(): self._timerUpdate.Stop() self.labelEMStatus.SetLabel("") + def getHeaderText(self, fit): return "Price" def getTextExtentW(self, text): - width, height = self.parent.GetTextExtent( text ) + width, height = self.parent.GetTextExtent(text) return width def populatePanel(self, contentPanel, headerPanel): @@ -65,8 +66,15 @@ class PriceViewFull(StatsView): self.panel = contentPanel self.headerPanel = headerPanel + headerContentSizer = wx.BoxSizer(wx.HORIZONTAL) + hsizer = headerPanel.GetSizer() + hsizer.Add(headerContentSizer, 0, 0, 0) + self.labelEMStatus = wx.StaticText(headerPanel, wx.ID_ANY, "") + headerContentSizer.Add(self.labelEMStatus) + headerPanel.GetParent().AddToggleItem(self.labelEMStatus) + gridPrice = wx.GridSizer(1, 3) - contentSizer.Add( gridPrice, 0, wx.EXPAND | wx.ALL, 0) + contentSizer.Add(gridPrice, 0, wx.EXPAND | wx.ALL, 0) for type in ("ship", "fittings", "total"): image = "%sPrice_big" % type if type != "ship" else "ship_big" box = wx.BoxSizer(wx.HORIZONTAL) @@ -86,9 +94,6 @@ class PriceViewFull(StatsView): setattr(self, "labelPrice%s" % type.capitalize(), lbl) hbox.Add(lbl, 0, wx.ALIGN_LEFT) -# hbox.Add(wx.StaticText(contentPanel, wx.ID_ANY, " ISK"), 0, wx.ALIGN_LEFT) - self.labelEMStatus = wx.StaticText(contentPanel, wx.ID_ANY, "") - contentSizer.Add(self.labelEMStatus,0) def refreshPanel(self, fit): if fit is not None: self.fit = fit