Add maximize button to resizeable windows and make character editor resizeable
This commit is contained in:
@@ -45,7 +45,7 @@ class GraphFrame(AuxiliaryFrame):
|
||||
pyfalog.warning('Matplotlib is not enabled. Skipping initialization.')
|
||||
return
|
||||
|
||||
super().__init__(parent, title='Graphs', style=wx.RESIZE_BORDER, size=(520, 390))
|
||||
super().__init__(parent, title='Graphs', size=(520, 390), resizeable=True)
|
||||
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
|
||||
|
||||
self.SetIcon(wx.Icon(BitmapLoader.getBitmap('graphs_small', 'gui')))
|
||||
|
||||
@@ -26,8 +26,10 @@ class AuxiliaryFrame(wx.Frame):
|
||||
|
||||
_instance = None
|
||||
|
||||
def __init__(self, parent, id=None, title=None, pos=None, size=None, style=None, name=None):
|
||||
def __init__(self, parent, id=None, title=None, pos=None, size=None, style=None, name=None, resizeable=False):
|
||||
baseStyle = wx.FRAME_NO_TASKBAR | wx.FRAME_FLOAT_ON_PARENT | wx.CAPTION | wx.CLOSE_BOX | wx.SYSTEM_MENU
|
||||
if resizeable:
|
||||
baseStyle = baseStyle | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX
|
||||
kwargs = {
|
||||
'parent': parent,
|
||||
'style': baseStyle if style is None else baseStyle | style}
|
||||
|
||||
@@ -154,7 +154,9 @@ class CharacterEntityEditor(EntityEditor):
|
||||
class CharacterEditor(AuxiliaryFrame):
|
||||
|
||||
def __init__(self, parent):
|
||||
super().__init__(parent, id=wx.ID_ANY, title="Character Editor", pos=wx.DefaultPosition, size=wx.Size(640, 600))
|
||||
super().__init__(
|
||||
parent, id=wx.ID_ANY, title="Character Editor", resizeable=True,
|
||||
pos=wx.DefaultPosition, size=wx.Size(640, 600))
|
||||
|
||||
i = wx.Icon(BitmapLoader.getBitmap("character_small", "gui"))
|
||||
self.SetIcon(i)
|
||||
|
||||
@@ -39,7 +39,7 @@ class DevTools(AuxiliaryFrame):
|
||||
|
||||
def __init__(self, parent):
|
||||
super().__init__(
|
||||
parent, id=wx.ID_ANY, title="Development Tools", style=wx.RESIZE_BORDER,
|
||||
parent, id=wx.ID_ANY, title="Development Tools", resizeable=True,
|
||||
size=wx.Size(400, 320) if "wxGTK" in wx.PlatformInfo else wx.Size(400, 240))
|
||||
self.mainFrame = parent
|
||||
self.block = False
|
||||
|
||||
@@ -25,7 +25,7 @@ class EveFittings(AuxiliaryFrame):
|
||||
def __init__(self, parent):
|
||||
super().__init__(
|
||||
parent, id=wx.ID_ANY, title="Browse EVE Fittings", pos=wx.DefaultPosition,
|
||||
size=wx.Size(750, 450), style=wx.RESIZE_BORDER)
|
||||
size=wx.Size(750, 450), resizeable=True)
|
||||
|
||||
self.mainFrame = parent
|
||||
mainSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
@@ -204,7 +204,7 @@ class ExportToEve(AuxiliaryFrame):
|
||||
def __init__(self, parent):
|
||||
super().__init__(
|
||||
parent, id=wx.ID_ANY, title="Export fit to EVE", pos=wx.DefaultPosition,
|
||||
size=wx.Size(400, 120) if "wxGTK" in wx.PlatformInfo else wx.Size(350, 100), style=wx.RESIZE_BORDER)
|
||||
size=wx.Size(400, 120) if "wxGTK" in wx.PlatformInfo else wx.Size(350, 100), resizeable=True)
|
||||
|
||||
self.mainFrame = parent
|
||||
|
||||
@@ -317,7 +317,7 @@ class SsoCharacterMgmt(AuxiliaryFrame):
|
||||
def __init__(self, parent):
|
||||
super().__init__(
|
||||
parent, id=wx.ID_ANY, title="SSO Character Management", pos=wx.DefaultPosition,
|
||||
size=wx.Size(550, 250), style=wx.RESIZE_BORDER)
|
||||
size=wx.Size(550, 250), resizeable=True)
|
||||
self.mainFrame = parent
|
||||
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ class ItemStatsFrame(AuxiliaryFrame):
|
||||
title="Item stats",
|
||||
pos=pos,
|
||||
size=size,
|
||||
style=wx.RESIZE_BORDER)
|
||||
resizeable=True)
|
||||
|
||||
empty = getattr(victim, "isEmpty", False)
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ class DmgPatternEditor(AuxiliaryFrame):
|
||||
|
||||
def __init__(self, parent):
|
||||
super().__init__(
|
||||
parent, id=wx.ID_ANY, title="Damage Pattern Editor", style=wx.RESIZE_BORDER,
|
||||
parent, id=wx.ID_ANY, title="Damage Pattern Editor", resizeable=True,
|
||||
# Dropdown list widget is scaled to its longest content line on GTK, adapt to that
|
||||
size=wx.Size(500, 240) if "wxGTK" in wx.PlatformInfo else wx.Size(400, 240))
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class AttributeEditor(AuxiliaryFrame):
|
||||
def __init__(self, parent):
|
||||
super().__init__(
|
||||
parent, wx.ID_ANY, title="Attribute Editor", pos=wx.DefaultPosition,
|
||||
size=wx.Size(650, 600), style=wx.RESIZE_BORDER)
|
||||
size=wx.Size(650, 600), resizeable=True)
|
||||
|
||||
i = wx.Icon(BitmapLoader.getBitmap("fit_rename_small", "gui"))
|
||||
self.SetIcon(i)
|
||||
|
||||
@@ -119,7 +119,7 @@ class ImplantSetEditor(AuxiliaryFrame):
|
||||
|
||||
def __init__(self, parent):
|
||||
super().__init__(
|
||||
parent, id=wx.ID_ANY, title="Implant Set Editor", style=wx.RESIZE_BORDER,
|
||||
parent, id=wx.ID_ANY, title="Implant Set Editor", resizeable=True,
|
||||
size=wx.Size(950, 500) if "wxGTK" in wx.PlatformInfo else wx.Size(850, 420))
|
||||
|
||||
self.block = False
|
||||
|
||||
@@ -126,7 +126,7 @@ class TargetProfileEditor(AuxiliaryFrame):
|
||||
|
||||
def __init__(self, parent):
|
||||
super().__init__(
|
||||
parent, id=wx.ID_ANY, title="Target Profile Editor", style=wx.RESIZE_BORDER,
|
||||
parent, id=wx.ID_ANY, title="Target Profile Editor", resizeable=True,
|
||||
# Dropdown list widget is scaled to its longest content line on GTK, adapt to that
|
||||
size=wx.Size(500, 240) if "wxGTK" in wx.PlatformInfo else wx.Size(350, 240))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user