Commit 9c72e79a authored by kliment's avatar kliment

Merge pull request #113 from johnflux/experimental

Fix send box not expanding correctly, and fix layouting in custom button dialog
parents 75e1df75 1c707c7a
......@@ -497,7 +497,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.commandbox=wx.TextCtrl(self.panel,style = wx.TE_PROCESS_ENTER)
self.commandbox.Bind(wx.EVT_TEXT_ENTER,self.sendline)
#self.printerControls.append(self.commandbox)
lbrs.Add(self.commandbox,0)
lbrs.Add(self.commandbox,1)
self.sendbtn=wx.Button(self.panel,-1,_("Send"))
self.sendbtn.Bind(wx.EVT_BUTTON,self.sendline)
#self.printerControls.append(self.sendbtn)
......@@ -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)
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)
topsizer.Layout()
topsizer.Fit(self)
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