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:
DarkPhoenix
2019-04-18 16:58:28 +03:00
parent 72ecc62732
commit febc98045c
3 changed files with 13 additions and 25 deletions

View File

@@ -89,7 +89,11 @@ class DmgPatternEditorDlg(wx.Dialog):
DAMAGE_TYPES = ("em", "thermal", "kinetic", "explosive")
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.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
@@ -159,11 +163,6 @@ class DmgPatternEditorDlg(wx.Dialog):
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)
importExport = (("Import", wx.ART_FILE_OPEN, "from"),
@@ -192,9 +191,6 @@ class DmgPatternEditorDlg(wx.Dialog):
self.patternChanged()
def closeEvent(self, event):
self.Destroy()
def ValuesUpdated(self, event=None):
if self.block:
return