Commit fe1e6659 authored by John Tapsell's avatar John Tapsell

Fix the custom color dialog to resize properly

parent 75e1df75
......@@ -1600,15 +1600,12 @@ class ButtonEdit(wx.Dialog):
wx.Dialog.__init__(self, None, title=_("Custom button"),style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
self.pronterface=pronterface
topsizer=wx.BoxSizer(wx.VERTICAL)
vbox=wx.StaticBoxSizer(wx.StaticBox(self,label=""),wx.VERTICAL)
topsizer.Add(vbox,1,wx.ALL+wx.EXPAND)
grid=wx.FlexGridSizer(rows=0,cols=2,hgap=4,vgap=2)
grid.AddGrowableCol(1,1)
vbox.Add(grid,0,wx.EXPAND)
grid.Add(wx.StaticText(self,-1, _("Button title")), 0, wx.BOTTOM+wx.RIGHT)
grid.Add(wx.StaticText(self,-1, _("Button title")), 0, wx.BOTTOM|wx.RIGHT)
self.name=wx.TextCtrl(self,-1,"")
grid.Add(self.name,1,wx.EXPAND)
grid.Add(wx.StaticText(self, -1, _("Command")), 0, wx.BOTTOM+wx.RIGHT)
grid.Add(wx.StaticText(self, -1, _("Command")), 0, wx.BOTTOM|wx.RIGHT)
self.command=wx.TextCtrl(self,-1,"")
xbox=wx.BoxSizer(wx.HORIZONTAL)
xbox.Add(self.command,1,wx.EXPAND)
......@@ -1616,14 +1613,14 @@ class ButtonEdit(wx.Dialog):
self.macrob=wx.Button(self,-1,"..",style=wx.BU_EXACTFIT)
self.macrob.Bind(wx.EVT_BUTTON,self.macrob_handler)
xbox.Add(self.macrob,0)
grid.Add(xbox)
grid.Add(wx.StaticText(self,-1, _("Color")),0,wx.BOTTOM+wx.RIGHT)
grid.Add(xbox,1,wx.EXPAND)
grid.Add(wx.StaticText(self,-1, _("Color")),0,wx.BOTTOM|wx.RIGHT)
self.color=wx.TextCtrl(self,-1,"")
grid.Add(self.color,1,wx.EXPAND)
topsizer.Add(self.CreateSeparatedButtonSizer(wx.OK+wx.CANCEL),0,wx.EXPAND)
self.SetSizer(topsizer)
topsizer.Layout()
topsizer.Fit(self)
topsizer.Add(grid,0,wx.EXPAND)
topsizer.Add( (0,0),1)
topsizer.Add(self.CreateStdDialogButtonSizer(wx.OK|wx.CANCEL),0,wx.ALIGN_CENTER)
self.SetSizer(topsizer)
def macrob_enabler(self,e):
macro = self.command.GetValue()
valid = False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment