Revert "Merge branch 'master' into wx3"
This reverts commit33a0c10650, reversing changes made to2077655694. Reverting merges fucks up git, but oh well - we probably better merge stuff manually rather than fucking up master with wx3 which is apparently buggy
This commit is contained in:
@@ -74,9 +74,12 @@ class ResistancesViewFull(StatsView):
|
||||
# Display table
|
||||
col = 0
|
||||
row = 0
|
||||
sizerResistances = wx.GridBagSizer()
|
||||
sizerResistances = wx.GridBagSizer(0, 0)
|
||||
contentSizer.Add( sizerResistances, 0, wx.EXPAND , 0)
|
||||
|
||||
for i in xrange(6):
|
||||
sizerResistances.AddGrowableCol(i + 1)
|
||||
|
||||
# Add an empty label, then the rest.
|
||||
sizerResistances.Add(wx.StaticText(contentPanel, wx.ID_ANY), wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ))
|
||||
col+=1
|
||||
@@ -92,8 +95,6 @@ class ResistancesViewFull(StatsView):
|
||||
|
||||
self.stEHPs.Bind(wx.EVT_BUTTON, self.toggleEHP)
|
||||
|
||||
for i in xrange(4):
|
||||
sizerResistances.AddGrowableCol(i+1)
|
||||
|
||||
sizerResistances.Add(self.stEHPs, wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER)
|
||||
col=0
|
||||
|
||||
@@ -52,7 +52,7 @@ class TargetingMiscViewFull(StatsView):
|
||||
gridTargetingMisc.AddGrowableCol(2)
|
||||
# Targeting
|
||||
|
||||
gridTargeting = wx.FlexGridSizer(5, 2)
|
||||
gridTargeting = wx.FlexGridSizer(4, 2)
|
||||
gridTargeting.AddGrowableCol(1)
|
||||
|
||||
gridTargetingMisc.Add(gridTargeting, 0, wx.ALIGN_LEFT | wx.ALL, 5)
|
||||
@@ -77,7 +77,7 @@ class TargetingMiscViewFull(StatsView):
|
||||
|
||||
# Misc
|
||||
gridTargetingMisc.Add( wx.StaticLine( contentPanel, wx.ID_ANY, style = wx.VERTICAL),0, wx.EXPAND, 3 )
|
||||
gridMisc = wx.FlexGridSizer(5, 2)
|
||||
gridMisc = wx.FlexGridSizer(4, 2)
|
||||
gridMisc.AddGrowableCol(1)
|
||||
gridTargetingMisc.Add(gridMisc,0 , wx.ALIGN_LEFT | wx.ALL, 5)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class AmmoIcon(ViewColumn):
|
||||
name = "Ammo Icon"
|
||||
def __init__(self, fittingView, params):
|
||||
ViewColumn.__init__(self, fittingView)
|
||||
self.size = 24
|
||||
self.size = 16
|
||||
self.maxsize = self.size
|
||||
self.mask = wx.LIST_MASK_IMAGE
|
||||
self.columnText = ""
|
||||
|
||||
@@ -8,7 +8,7 @@ class BaseIcon(ViewColumn):
|
||||
name = "Base Icon"
|
||||
def __init__(self, fittingView, params):
|
||||
ViewColumn.__init__(self, fittingView)
|
||||
self.size = 24
|
||||
self.size = 16
|
||||
self.maxsize = self.size
|
||||
self.mask = wx.LIST_MASK_IMAGE
|
||||
self.columnText = ""
|
||||
|
||||
@@ -21,7 +21,6 @@ import wx
|
||||
import wx.lib.newevent
|
||||
import gui.utils.colorUtils as colorUtils
|
||||
import gui.utils.drawUtils as drawUtils
|
||||
import gui.utils.fonts as fonts
|
||||
from gui import bitmapLoader
|
||||
import gui.utils.fonts as fonts
|
||||
|
||||
@@ -672,8 +671,6 @@ class PFTabsContainer(wx.Panel):
|
||||
"""
|
||||
|
||||
wx.Panel.__init__(self, parent, id, pos, size)
|
||||
if wx.VERSION >= (3,0):
|
||||
self.SetBackgroundStyle(wx.BG_STYLE_PAINT)
|
||||
|
||||
self.tabs = []
|
||||
width, height = size
|
||||
|
||||
@@ -146,6 +146,7 @@ class TogglePanel ( wx.Panel ):
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def IsExpanded(self):
|
||||
""" Returns ``True`` if the pane window is currently shown. """
|
||||
if self._toggle == 1:
|
||||
@@ -153,6 +154,7 @@ class TogglePanel ( wx.Panel ):
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def OnStateChange(self, sz):
|
||||
"""
|
||||
Handles the status changes (collapsing/expanding).
|
||||
@@ -166,8 +168,9 @@ class TogglePanel ( wx.Panel ):
|
||||
|
||||
self.parent.GetSizer().SetSizeHints(self.parent)
|
||||
|
||||
|
||||
if self.IsCollapsed():
|
||||
# expanded . collapsed transition
|
||||
# expanded . collapsed transition
|
||||
if self.parent.GetSizer():
|
||||
# we have just set the size hints...
|
||||
sz = self.parent.GetSizer().CalcMin()
|
||||
@@ -175,36 +178,39 @@ class TogglePanel ( wx.Panel ):
|
||||
# use SetClientSize() and not SetSize() otherwise the size for
|
||||
# e.g. a wxFrame with a menubar wouldn't be correctly set
|
||||
self.parent.SetClientSize(sz)
|
||||
|
||||
else:
|
||||
self.parent.Layout()
|
||||
|
||||
else:
|
||||
# collapsed . expanded transition
|
||||
# force our parent to "fit", i.e. expand so that it can honour
|
||||
# our minimal size
|
||||
|
||||
# collapsed . expanded transition
|
||||
|
||||
# force our parent to "fit", i.e. expand so that it can honour
|
||||
# our minimal size
|
||||
self.parent.Fit()
|
||||
|
||||
|
||||
# Toggle the content panel (hide/show)
|
||||
def toggleContent(self, event):
|
||||
|
||||
def toggleContent( self, event ):
|
||||
self.Freeze()
|
||||
print self.contentPanel.GetSize()
|
||||
if self._toggle == 1:
|
||||
self.contentMinSize = self.contentPanel.GetSize()
|
||||
self.contentPanel.Hide()
|
||||
self.headerBmp.SetBitmap(self.bmpCollapsed)
|
||||
else:
|
||||
self.contentPanel.Show()
|
||||
self.headerBmp.SetBitmap(self.bmpExpanded)
|
||||
self.contentPanel.SetMinSize(wx.Size(self.contentMinSize[0],0))
|
||||
self.headerBmp.SetBitmap( self.bmpCollapsed)
|
||||
|
||||
|
||||
else:
|
||||
self.contentPanel.SetMinSize(self.contentMinSize)
|
||||
|
||||
self.headerBmp.SetBitmap( self.bmpExpanded)
|
||||
|
||||
|
||||
self._toggle *=-1
|
||||
|
||||
self._toggle *= -1
|
||||
self.Layout()
|
||||
self.Thaw()
|
||||
|
||||
if self.forceLayout == -1:
|
||||
if wx.VERSION >= (3, 0):
|
||||
x, y = self.GetBestSize()
|
||||
y -= self.contentPanel.GetSize()[1]
|
||||
else:
|
||||
x, y = self.GetBestSize()
|
||||
self.OnStateChange((x, y))
|
||||
self.OnStateChange(self.GetBestSize())
|
||||
else:
|
||||
self.parent.Layout()
|
||||
self.parent.Layout()
|
||||
|
||||
@@ -15,7 +15,6 @@ import gui.utils.animEffects as animEffects
|
||||
|
||||
import gui.sfBrowserItem as SFItem
|
||||
from gui.contextMenu import ContextMenu
|
||||
import gui.utils.fonts as fonts
|
||||
|
||||
import service
|
||||
import gui.utils.fonts as fonts
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
'''
|
||||
Font file to handle the differences in font calculations between
|
||||
different wxPython versions
|
||||
'''
|
||||
|
||||
import wx
|
||||
|
||||
if 'wxMac' in wx.PlatformInfo:
|
||||
|
||||
19
pyfa.py
19
pyfa.py
@@ -20,7 +20,6 @@
|
||||
|
||||
import sys
|
||||
import re
|
||||
import config
|
||||
|
||||
if not hasattr(sys, 'frozen'):
|
||||
|
||||
@@ -31,27 +30,18 @@ if not hasattr(sys, 'frozen'):
|
||||
try:
|
||||
import wxversion
|
||||
except ImportError:
|
||||
print("Cannot find wxPython\nYou can download wxPython (2.8+) from http://www.wxpython.org/")
|
||||
print("Cannot find wxPython\nYou can download wxPython (2.8) from http://www.wxpython.org/")
|
||||
sys.exit(1)
|
||||
|
||||
# if user wants to force 2.8, try that and go directly to ensureMinimal path if fails
|
||||
try:
|
||||
if getattr(config.configforced, "force28", False):
|
||||
wxversion.select('2.8')
|
||||
else:
|
||||
# try 3.0, then 2.8. If any exceptions, go to ensureMinimal path
|
||||
try:
|
||||
wxversion.select('3.0')
|
||||
except:
|
||||
wxversion.select('2.9')
|
||||
wxversion.select('2.8')
|
||||
except wxversion.VersionError:
|
||||
try:
|
||||
wxversion.ensureMinimal('2.8')
|
||||
except wxversion.VersionError:
|
||||
print "Installed wxPython version doesn't meet requirements.\nYou can download wxPython (2.8+) from http://www.wxpython.org/"
|
||||
print("Installed wxPython version doesn't meet requirements.\nYou can download wxPython (2.8) from http://www.wxpython.org/")
|
||||
sys.exit(1)
|
||||
else:
|
||||
print "wxPython 2.8 not found; attempting to use newer version, expect errors"
|
||||
print("wxPython 2.8 not found; attempting to use newer version, expect errors")
|
||||
|
||||
try:
|
||||
import sqlalchemy
|
||||
@@ -82,6 +72,7 @@ if __name__ == "__main__":
|
||||
parser.add_option("-r", "--root", action="store_true", dest="rootsavedata", help="if you want pyfa to store its data in root folder, use this option", default=False)
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
import config
|
||||
# Configure paths
|
||||
if options.rootsavedata is True:
|
||||
config.saveInRoot = True
|
||||
|
||||
Reference in New Issue
Block a user