Skip to content

Commit

Permalink
wx.metadata/mdlib: fix constraints builder dialog layout
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi committed Jul 2, 2020
1 parent 8d77dde commit f13fe7b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions grass7/gui/wxpython/wx.metadata/mdlib/cswlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,21 @@ def __init__(self, parent, settings=''):

def _layout(self):
panelSizer = wx.BoxSizer(wx.VERTICAL)
panelSizer.Add(self.label)
panelSizer.Add(10, 10, 1, wx.EXPAND)
panelSizer.Add(self.constrCtrl, 1, wx.EXPAND)
sb = wx.StaticBox(self, label='Constraints')
sbs = wx.StaticBoxSizer(sb, orient=wx.VERTICAL)
sbs.Add(self.label, flag=wx.TOP | wx.LEFT | wx.RIGHT, border=10)
sbs.Add(10, 10, 1, wx.EXPAND)
sbs.Add(self.constrCtrl, 1, flag=wx.EXPAND | wx.LEFT | wx.RIGHT |
wx.BOTTOM, border=10)
panelSizer.Add(sbs, flag=wx.ALL, border=10)

horSizer = wx.BoxSizer(wx.HORIZONTAL)
horSizer.Add(self.applyBtt)
horSizer.Add(self.cancelBtt)
horSizer.Add(self.cancelBtt, flag=wx.LEFT, border=5)
panelSizer.Add(10, 10, 1, wx.EXPAND)
panelSizer.Add(horSizer)
panelSizer.Add(horSizer, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM,
border=10)

self.SetSizerAndFit(panelSizer)


Expand Down Expand Up @@ -213,8 +219,7 @@ def OnKeywordDialog(self, evt):
self.constrPnl.cancelBtt.Bind(wx.EVT_BUTTON, self._destroyDialog)
dbSizer = wx.BoxSizer(wx.VERTICAL)
dbSizer.Add(self.constrPnl, flag=wx.EXPAND)
self.geDialog.SetSizer(dbSizer)
self.geDialog.SetBestFittingSize()
self.geDialog.SetSizerAndFit(dbSizer)
self.geDialog.ShowModal()

def _destroyDialog(self, evt):
Expand Down

0 comments on commit f13fe7b

Please sign in to comment.