mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Fixed KeystrokeEditor's GUI
This commit is contained in:
parent
df4d3eb0e6
commit
1c5c1067e6
@ -6,27 +6,26 @@ from wxUI.dialogs import baseDialog
|
|||||||
class keystrokeEditorDialog(baseDialog.BaseWXDialog):
|
class keystrokeEditorDialog(baseDialog.BaseWXDialog):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(keystrokeEditorDialog, self).__init__(parent=None, id=-1, title=_(u"Keystroke editor"))
|
super(keystrokeEditorDialog, self).__init__(parent=None, id=-1, title=_(u"Keystroke editor"))
|
||||||
panel = wx.Panel(self)
|
|
||||||
self.actions = []
|
self.actions = []
|
||||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||||
keysText = wx.StaticText(panel, -1, _(u"Select a keystroke to edit"))
|
keysText = wx.StaticText(self, -1, _(u"Select a keystroke to edit"))
|
||||||
self.keys = widgets.list(self, _(u"Action"), _(u"Keystroke"), style=wx.LC_REPORT|wx.LC_SINGLE_SEL, size=(400, 450))
|
self.keys = widgets.list(self, _(u"Action"), _(u"Keystroke"), style=wx.LC_REPORT|wx.LC_SINGLE_SEL, size=(400, 450))
|
||||||
self.keys.list.SetFocus()
|
self.keys.list.SetFocus()
|
||||||
firstSizer = wx.BoxSizer(wx.HORIZONTAL)
|
firstSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
firstSizer.Add(keysText, 0, wx.ALL, 5)
|
firstSizer.Add(keysText, 0, wx.ALL, 5)
|
||||||
firstSizer.Add(self.keys.list, 0, wx.ALL, 5)
|
firstSizer.Add(self.keys.list, 0, wx.ALL, 5)
|
||||||
self.edit = wx.Button(panel, -1, _(u"Edit"))
|
self.edit = wx.Button(self, -1, _(u"Edit"))
|
||||||
self.edit.SetDefault()
|
self.edit.SetDefault()
|
||||||
self.undefine = wx.Button(panel, -1, _("Undefine keystroke"))
|
self.undefine = wx.Button(self, -1, _("Undefine keystroke"))
|
||||||
self.execute = wx.Button(panel, -1, _(u"Execute action"))
|
self.execute = wx.Button(self, -1, _(u"Execute action"))
|
||||||
close = wx.Button(panel, wx.ID_CANCEL, _(u"Close"))
|
close = wx.Button(self, wx.ID_CANCEL, _(u"Close"))
|
||||||
secondSizer = wx.BoxSizer(wx.HORIZONTAL)
|
secondSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
secondSizer.Add(self.edit, 0, wx.ALL, 5)
|
secondSizer.Add(self.edit, 0, wx.ALL, 5)
|
||||||
secondSizer.Add(self.execute, 0, wx.ALL, 5)
|
secondSizer.Add(self.execute, 0, wx.ALL, 5)
|
||||||
secondSizer.Add(close, 0, wx.ALL, 5)
|
secondSizer.Add(close, 0, wx.ALL, 5)
|
||||||
sizer.Add(firstSizer, 0, wx.ALL, 5)
|
sizer.Add(firstSizer, 0, wx.ALL, 5)
|
||||||
sizer.Add(secondSizer, 0, wx.ALL, 5)
|
sizer.Add(secondSizer, 0, wx.ALL, 5)
|
||||||
panel.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
self.SetClientSize(sizer.CalcMin())
|
self.SetClientSize(sizer.CalcMin())
|
||||||
|
|
||||||
def put_keystrokes(self, actions, keystrokes):
|
def put_keystrokes(self, actions, keystrokes):
|
||||||
|
Loading…
Reference in New Issue
Block a user