Remove some GTK-specific close buttons (as gnome now has close titlebar in dialogs for a while) and resize some dialogs
This commit is contained in:
@@ -90,8 +90,9 @@ class ItemStatsDialog(wx.Dialog):
|
|||||||
" (%d)" % item.ID if config.debug else ""))
|
" (%d)" % item.ID if config.debug else ""))
|
||||||
|
|
||||||
self.SetMinSize((300, 200))
|
self.SetMinSize((300, 200))
|
||||||
if "wxGTK" in wx.PlatformInfo: # GTK has huge tab widgets, give it a bit more room
|
# GTK has huge tab widgets, give it a bit more room
|
||||||
self.SetSize((640, 620))
|
if "wxGTK" in wx.PlatformInfo:
|
||||||
|
self.SetSize((640, 600))
|
||||||
else:
|
else:
|
||||||
self.SetSize((550, 500))
|
self.SetSize((550, 500))
|
||||||
# self.SetMaxSize((500, -1))
|
# self.SetMaxSize((500, -1))
|
||||||
@@ -99,11 +100,6 @@ class ItemStatsDialog(wx.Dialog):
|
|||||||
self.container = ItemStatsContainer(self, victim, item, itmContext)
|
self.container = ItemStatsContainer(self, victim, item, itmContext)
|
||||||
self.mainSizer.Add(self.container, 1, wx.EXPAND)
|
self.mainSizer.Add(self.container, 1, wx.EXPAND)
|
||||||
|
|
||||||
if "wxGTK" in wx.PlatformInfo:
|
|
||||||
self.closeBtn = wx.Button(self, wx.ID_ANY, "Close", wx.DefaultPosition, wx.DefaultSize, 0)
|
|
||||||
self.mainSizer.Add(self.closeBtn, 0, wx.ALL | wx.ALIGN_RIGHT, 5)
|
|
||||||
self.closeBtn.Bind(wx.EVT_BUTTON, (lambda e: self.Close()))
|
|
||||||
|
|
||||||
self.SetSizer(self.mainSizer)
|
self.SetSizer(self.mainSizer)
|
||||||
|
|
||||||
self.parentWnd = gui.mainFrame.MainFrame.getInstance()
|
self.parentWnd = gui.mainFrame.MainFrame.getInstance()
|
||||||
|
|||||||
@@ -89,7 +89,11 @@ class DmgPatternEditorDlg(wx.Dialog):
|
|||||||
DAMAGE_TYPES = ("em", "thermal", "kinetic", "explosive")
|
DAMAGE_TYPES = ("em", "thermal", "kinetic", "explosive")
|
||||||
|
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title="Damage Pattern Editor", size=wx.Size(400, 240))
|
wx.Dialog.__init__(
|
||||||
|
self, parent, id=wx.ID_ANY,
|
||||||
|
title="Damage Pattern Editor",
|
||||||
|
# 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))
|
||||||
|
|
||||||
self.block = False
|
self.block = False
|
||||||
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
|
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
|
||||||
@@ -159,11 +163,6 @@ class DmgPatternEditorDlg(wx.Dialog):
|
|||||||
|
|
||||||
mainSizer.Add(contentSizer, 1, wx.EXPAND, 0)
|
mainSizer.Add(contentSizer, 1, wx.EXPAND, 0)
|
||||||
|
|
||||||
if "wxGTK" in wx.PlatformInfo:
|
|
||||||
self.closeBtn = wx.Button(self, wx.ID_ANY, "Close", wx.DefaultPosition, wx.DefaultSize, 0)
|
|
||||||
mainSizer.Add(self.closeBtn, 0, wx.ALL | wx.ALIGN_RIGHT, 5)
|
|
||||||
self.closeBtn.Bind(wx.EVT_BUTTON, self.closeEvent)
|
|
||||||
|
|
||||||
self.SetSizer(mainSizer)
|
self.SetSizer(mainSizer)
|
||||||
|
|
||||||
importExport = (("Import", wx.ART_FILE_OPEN, "from"),
|
importExport = (("Import", wx.ART_FILE_OPEN, "from"),
|
||||||
@@ -192,9 +191,6 @@ class DmgPatternEditorDlg(wx.Dialog):
|
|||||||
|
|
||||||
self.patternChanged()
|
self.patternChanged()
|
||||||
|
|
||||||
def closeEvent(self, event):
|
|
||||||
self.Destroy()
|
|
||||||
|
|
||||||
def ValuesUpdated(self, event=None):
|
def ValuesUpdated(self, event=None):
|
||||||
if self.block:
|
if self.block:
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -87,7 +87,11 @@ class ResistsEditorDlg(wx.Dialog):
|
|||||||
DAMAGE_TYPES = ("em", "thermal", "kinetic", "explosive")
|
DAMAGE_TYPES = ("em", "thermal", "kinetic", "explosive")
|
||||||
|
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title="Target Resists Editor", size=wx.Size(350, 240))
|
wx.Dialog.__init__(
|
||||||
|
self, parent, id=wx.ID_ANY,
|
||||||
|
# Dropdown list widget is scaled to its longest content line on GTK, adapt to that
|
||||||
|
title="Target Resists Editor",
|
||||||
|
size=wx.Size(500, 240) if "wxGTK" in wx.PlatformInfo else wx.Size(350, 240))
|
||||||
|
|
||||||
self.block = False
|
self.block = False
|
||||||
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
|
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
|
||||||
@@ -150,11 +154,6 @@ class ResistsEditorDlg(wx.Dialog):
|
|||||||
|
|
||||||
mainSizer.Add(contentSizer, 1, wx.EXPAND, 0)
|
mainSizer.Add(contentSizer, 1, wx.EXPAND, 0)
|
||||||
|
|
||||||
if "wxGTK" in wx.PlatformInfo:
|
|
||||||
self.closeBtn = wx.Button(self, wx.ID_ANY, "Close", wx.DefaultPosition, wx.DefaultSize, 0)
|
|
||||||
mainSizer.Add(self.closeBtn, 0, wx.ALL | wx.ALIGN_RIGHT, 5)
|
|
||||||
self.closeBtn.Bind(wx.EVT_BUTTON, self.closeEvent)
|
|
||||||
|
|
||||||
self.SetSizer(mainSizer)
|
self.SetSizer(mainSizer)
|
||||||
|
|
||||||
importExport = (("Import", wx.ART_FILE_OPEN, "from"),
|
importExport = (("Import", wx.ART_FILE_OPEN, "from"),
|
||||||
@@ -189,9 +188,6 @@ class ResistsEditorDlg(wx.Dialog):
|
|||||||
|
|
||||||
self.ShowModal()
|
self.ShowModal()
|
||||||
|
|
||||||
def closeEvent(self, event):
|
|
||||||
self.Destroy()
|
|
||||||
|
|
||||||
def ValuesUpdated(self, event=None):
|
def ValuesUpdated(self, event=None):
|
||||||
"""
|
"""
|
||||||
Event that is fired when resists values change. Iterates through all
|
Event that is fired when resists values change. Iterates through all
|
||||||
|
|||||||
Reference in New Issue
Block a user