Use small icon with mining yield / firepower toggle button

This commit is contained in:
blitzmann
2014-06-12 19:22:29 -04:00
parent bd60733bfe
commit e2abc51bbf
4 changed files with 13 additions and 7 deletions

View File

@@ -46,7 +46,7 @@ class FirepowerViewFull(StatsView):
sizerFirepower = wx.FlexGridSizer(1, 4)
sizerFirepower.AddGrowableCol(1)
contentSizer.Add( sizerFirepower, 0, wx.EXPAND, 0)
counter = 0
@@ -98,11 +98,11 @@ class FirepowerViewFull(StatsView):
gridS.Add(lbl, 0, wx.ALIGN_LEFT)
image = bitmapLoader.getBitmap("mining_big", "icons")
miningyield = wx.BitmapButton(contentPanel, -1, image)
miningyield.SetToolTip(wx.ToolTip("Click to toggle to Mining Yield "))
miningyield.Bind(wx.EVT_BUTTON, self.switchToMiningYieldView)
sizerFirepower.Add(miningyield, 0, wx.ALIGN_LEFT)
image = bitmapLoader.getBitmap("mining_small", "icons")
self.miningyield = wx.BitmapButton(contentPanel, -1, image)
self.miningyield.SetToolTip(wx.ToolTip("Click to toggle to Mining Yield "))
self.miningyield.Bind(wx.EVT_BUTTON, self.switchToMiningYieldView)
sizerFirepower.Add(self.miningyield, 0, wx.ALIGN_LEFT)
self._cachedValues.append(0)
@@ -134,6 +134,11 @@ class FirepowerViewFull(StatsView):
("labelFullDpsDrone", lambda: fit.droneDPS, 3, 0, 0, "%s DPS", None),
("labelFullVolleyTotal", lambda: fit.weaponVolley, 3, 0, 0, "%s", "Volley: %.1f"),
("labelFullDpsTotal", lambda: fit.totalDPS, 3, 0, 0, "%s", None))
# See GH issue #
#if fit is not None and fit.totalYield > 0:
# self.miningyield.Show()
#else:
# self.miningyield.Hide()
counter = 0
for labelName, value, prec, lowest, highest, valueFormat, altFormat in stats:
@@ -147,6 +152,7 @@ class FirepowerViewFull(StatsView):
label.SetToolTip(wx.ToolTip(tipStr))
self._cachedValues[counter] = value
counter +=1
self.panel.Layout()
self.headerPanel.Layout()

View File

@@ -92,7 +92,7 @@ class MiningYieldViewFull(StatsView):
self._cachedValues.append(0)
image = bitmapLoader.getBitmap("turret_big", "icons")
image = bitmapLoader.getBitmap("turret_small", "icons")
firepower = wx.BitmapButton(contentPanel, -1, image)
firepower.SetToolTip(wx.ToolTip("Click to toggle to Firepower View"))
firepower.Bind(wx.EVT_BUTTON, self.switchToFirepowerView)

BIN
icons/mining_small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

BIN
icons/turret_small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B