Bläddra i källkod

wxGUI dialog layout cosmetics
(merge from devbr6, https://trac.osgeo.org/grass/changeset/33204)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33205 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 17 år sedan
förälder
incheckning
cec4652c81
1 ändrade filer med 7 tillägg och 5 borttagningar
  1. 7 5
      gui/wxpython/gui_modules/menuform.py

+ 7 - 5
gui/wxpython/gui_modules/menuform.py

@@ -1045,13 +1045,15 @@ class cmdPanel(wx.Panel):
                                 maxValue = 1e6
                             txt2 = wx.SpinCtrl(parent=which_panel, id=wx.ID_ANY, size=globalvar.DIALOG_SPIN_SIZE,
                                                min=minValue, max=maxValue)
+                            style = wx.BOTTOM | wx.LEFT
                         else:
-                            txt2 = wx.TextCtrl(parent=which_panel, value = p.get('default',''),
-                                               size=globalvar.DIALOG_TEXTCTRL_SIZE)
+                            txt2 = wx.TextCtrl(parent=which_panel, value = p.get('default',''))
+                            style = wx.EXPAND | wx.BOTTOM | wx.LEFT
+                        
                         if p.get('value','') != '':
                             txt2.SetValue(p['value']) # parameter previously set
                         which_sizer.Add(item=txt2, proportion=0,
-                                        flag=wx.EXPAND | wx.BOTTOM | wx.LEFT, border=5)
+                                        flag=style, border=5)
 
                         p['wxId'] = txt2.GetId()
                         txt2.Bind(wx.EVT_TEXT, self.OnSetValue)
@@ -1085,8 +1087,8 @@ class cmdPanel(wx.Panel):
                 if p.get('multiple','yes') == 'yes' or \
                         p.get('type', 'string') in ('string', 'float') or \
                         len(p.get('key_desc', [])) > 1:
-                    txt3 = wx.TextCtrl(parent=which_panel, value = p.get('default',''),
-                                       size=globalvar.DIALOG_TEXTCTRL_SIZE)
+                    txt3 = wx.TextCtrl(parent=which_panel, value = p.get('default',''))
+                    
                     if p.get('value','') != '':
                         txt3.SetValue(str(p['value'])) # parameter previously set