Merge branch 'master' of evefit.org:pyfa

This commit is contained in:
cncfanatics
2010-11-20 22:39:47 +01:00
6 changed files with 19 additions and 12 deletions

View File

@@ -28,7 +28,7 @@ class AmmoPattern(ContextMenu):
fit = self.mainFrame.getActiveFit()
sFit = service.Fit.getInstance()
sFit.setAsPattern(fit, item)
wx.PostEvent(self.mainFrame, gui.fittingView.FitChanged(fitID=fit))
wx.PostEvent(self.mainFrame, gui.builtinViews.fittingView.FitChanged(fitID=fit))
def getBitmap(self, context, selection):
return None

View File

@@ -89,7 +89,7 @@ class ResistancesViewFull(StatsView):
bitmap.SetToolTip(tooltip)
sizerResistances.Add(bitmap, wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER)
col+=1
self.stEHPs = wx.StaticText(contentPanel, wx.ID_ANY, "EHP", style = wx.SIMPLE_BORDER if 'wxGTK' in wx.PlatformInfo else wx.DOUBLE_BORDER)
self.stEHPs = wx.StaticText(contentPanel, wx.ID_ANY, "EHP", style = wx.DOUBLE_BORDER if 'wxMSW' in wx.PlatformInfo else wx.SIMPLE_BORDER)
self.stEHPs.SetToolTip(wx.ToolTip("Click to toggle between effective HP and raw HP"))
self.stEHPs.Bind(wx.EVT_LEFT_UP, self.toggleEHP)

View File

@@ -989,7 +989,14 @@ class PFTabsContainer(wx.Panel):
mdc.SelectObject(canvas)
selected = 0
color = wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE)
# TODO
# This is a hack because on mac os the system colour constants are somehow wrong,
# additionally somehow the colors get changed when drawing (all RGB values are off by 4)
# TODO
if 'wxMac' in wx.PlatformInfo:
color = wx.Colour(232, 232, 232)
else:
color = wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE)
mdc.SetBackground (wx.Brush(color))
# mdc.SetBackground (wx.Brush((66,113,202)))

View File

@@ -88,12 +88,12 @@ class GraphFrame(wx.Frame):
self.select(0)
self.fitList.fitList.Bind(wx.EVT_LEFT_DCLICK, self.removeItem)
self.mainFrame.Bind(gui.fittingView.FIT_CHANGED, self.draw)
self.mainFrame.Bind(gui.builtinViews.fittingView.FIT_CHANGED, self.draw)
self.Bind(wx.EVT_CLOSE, self.close)
def close(self, event):
self.fitList.fitList.Unbind(wx.EVT_LEFT_DCLICK, handler=self.removeItem)
self.mainFrame.Unbind(gui.fittingView.FIT_CHANGED, handler=self.draw)
self.mainFrame.Unbind(gui.builtinViews.fittingView.FIT_CHANGED, handler=self.draw)
event.Skip()
def getView(self):

View File

@@ -43,7 +43,7 @@ class MarketBrowser(wx.Panel):
vbox.Add(p, 0, wx.EXPAND)
self.search = SearchBox(p)
sizer.Add(self.search, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 2)
p.SetMinSize((wx.SIZE_AUTO_WIDTH, 27))
p.SetMinSize((wx.SIZE_AUTO_WIDTH, 33))
self.splitter = wx.SplitterWindow(self, style = wx.SP_LIVE_UPDATE)
vbox.Add(self.splitter, 1, wx.EXPAND)

View File

@@ -317,12 +317,12 @@ class HeaderPane (wx.Panel):
self.sbReset = PFGenBitmapButton( self, wx.ID_ANY, self.resetBmp, wx.DefaultPosition, bmpSize, wx.BORDER_NONE )
mainSizer.Add(self.sbReset, 0, wx.LEFT | wx.TOP | wx.BOTTOM | wx.ALIGN_CENTER_VERTICAL , 5)
self.sbReset.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) )
self.sbReset.SetBackgroundColour( wx.Colour(0, 0, 0, 0) )
self.sbReset.SetBitmapSelected(self.resetBmp)
self.sbRewind = PFGenBitmapButton( self, wx.ID_ANY, self.rewBmp, wx.DefaultPosition, bmpSize, wx.BORDER_NONE )
mainSizer.Add(self.sbRewind, 0, wx.LEFT | wx.TOP | wx.BOTTOM | wx.ALIGN_CENTER_VERTICAL , 5)
self.sbRewind.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) )
self.sbRewind.SetBackgroundColour( wx.Colour(0, 0, 0, 0) )
self.sbRewind.SetBitmapSelected(self.rewBmp)
self.sl1 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_VERTICAL )
@@ -330,11 +330,11 @@ class HeaderPane (wx.Panel):
self.sbNewFit = PFGenBitmapButton( self, wx.ID_ANY, self.newBmp, wx.DefaultPosition, bmpSize, wx.BORDER_NONE )
mainSizer.Add(self.sbNewFit, 0, wx.LEFT | wx.TOP | wx.BOTTOM | wx.ALIGN_CENTER_VERTICAL , 5)
self.sbNewFit.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) )
self.sbNewFit.SetBackgroundColour( wx.Colour(0, 0, 0, 0) )
self.sbSwitchFitView = PFGenBitmapButton( self, wx.ID_ANY, self.switchBmp, wx.DefaultPosition, bmpSize, wx.BORDER_NONE )
mainSizer.Add(self.sbSwitchFitView, 0, wx.LEFT | wx.TOP | wx.BOTTOM | wx.ALIGN_CENTER_VERTICAL , 5)
self.sbSwitchFitView.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) )
self.sbSwitchFitView.SetBackgroundColour( wx.Colour(0, 0, 0, 0) )
self.stStatus = wx.StaticText( self, wx.ID_ANY, "", wx.DefaultPosition, wx.DefaultSize, 0 )
@@ -356,7 +356,7 @@ class HeaderPane (wx.Panel):
self.sbSearch = PFGenBitmapButton( self, wx.ID_ANY, self.searchBmp, wx.DefaultPosition, bmpSize, wx.BORDER_NONE )
mainSizer.Add(self.sbSearch, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL , 5)
self.sbSearch.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) )
self.sbSearch.SetBackgroundColour( wx.Colour(0, 0, 0, 0) )
self.SetSizer(mainSizer)
@@ -1417,7 +1417,7 @@ class FitItem(wx.Window):
fitInst = service.fit.Fit.getInstance()
draggedFit = fitInst.getFit(self.fitID)
fitInst.project(activeFit,draggedFit)
wx.PostEvent(self.mainFrame, gui.fittingView.FitChanged(fitID=activeFit))
wx.PostEvent(self.mainFrame, gui.builtingViews.fittingView.FitChanged(fitID=activeFit))
if self.checkForGraphFrame(targetWnd, gfWnd):
self.mainFrame.graphFrame.AppendFitToList(self.fitID)