mailr11763 - in /branches/bieri_gui/gui_bieri/user_functions: base.py molecule.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on December 10, 2010 - 17:55:
Author: bugman
Date: Fri Dec 10 17:55:32 2010
New Revision: 11763

URL: http://svn.gna.org/viewcvs/relax?rev=11763&view=rev
Log:
Better layout of the molecule.add user function window.


Modified:
    branches/bieri_gui/gui_bieri/user_functions/base.py
    branches/bieri_gui/gui_bieri/user_functions/molecule.py

Modified: branches/bieri_gui/gui_bieri/user_functions/base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/base.py?rev=11763&r1=11762&r2=11763&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/user_functions/base.py (original)
+++ branches/bieri_gui/gui_bieri/user_functions/base.py Fri Dec 10 17:55:32 
2010
@@ -65,6 +65,7 @@
     border = 5
     frame_title = ''
     image_path = None
+    input_size = 27
     main_text = ''
     title = ''
 

Modified: branches/bieri_gui/gui_bieri/user_functions/molecule.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/molecule.py?rev=11763&r1=11762&r2=11763&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/user_functions/molecule.py (original)
+++ branches/bieri_gui/gui_bieri/user_functions/molecule.py Fri Dec 10 
17:55:32 2010
@@ -72,6 +72,9 @@
     main_text = 'This dialog allows you to add new molecules to the relax 
data store.  The molecule will be added to the current data pipe.'
     title = 'Addition of new molecules'
 
+    # Some private class variables.
+    _spacing = 20
+
 
     def _evt_mol_type(self, event):
         """Selection of the molecule type.
@@ -91,11 +94,20 @@
         @type sizer:    wx.Sizer instance
         """
 
+        # Spacer.
+        sizer.AddSpacer(self._spacing)
+
         # The molecule name input.
-        sizer.Add(self.mol_name_element(), 1, wx.EXPAND|wx.SHAPED, 5)
+        sizer.Add(self.mol_name_element(), 1, wx.ALIGN_TOP|wx.SHAPED, 
self.border)
+
+        # Spacer.
+        sizer.AddSpacer(self._spacing)
 
         # The type selection.
-        sizer.Add(self.mol_type_element(), 1, wx.EXPAND|wx.SHAPED, 5)
+        sizer.Add(self.mol_type_element(), 1, wx.ALIGN_TOP, self.border)
+
+        # Spacer.
+        sizer.AddSpacer(self._spacing)
 
 
     def execute(self):
@@ -120,11 +132,12 @@
 
         # The molecule name.
         text = wx.StaticText(self, -1, "The name of the molecule:", 
style=wx.ALIGN_RIGHT)
-        sizer.Add(text, 1, 
wx.LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0)
+        sizer.Add(text, 1, 
wx.LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, self.border)
 
         # The input field.
         self.mol_name = wx.TextCtrl(self, -1, '')
-        sizer.Add(self.mol_name, 1, 
wx.EXPAND|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0)
+        self.mol_name.SetMinSize((50, self.input_size))
+        sizer.Add(self.mol_name, 1, 
wx.EXPAND|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, self.border)
 
         # Return the sizer.
         return sizer
@@ -141,12 +154,12 @@
         sizer = wx.BoxSizer(wx.HORIZONTAL)
 
         # The molecule typ.
-        text = wx.StaticText(self, -1, "The type of molecule:", 
style=wx.ALIGN_RIGHT)
-        sizer.Add(text, 1, 
wx.LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0)
+        text = wx.StaticText(self, -1, "The type of molecule:", 
style=wx.ALIGN_LEFT)
+        sizer.Add(text, 1, wx.LEFT, self.border)
 
         # The input field.
-        type_choice = wx.Choice(self, -1, style=wx.ALIGN_RIGHT, choices=[''] 
+ ALLOWED_MOL_TYPES)
-        sizer.Add(type_choice, 1, 
wx.LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0)
+        type_choice = wx.Choice(self, -1, style=wx.ALIGN_LEFT, choices=[''] 
+ ALLOWED_MOL_TYPES)
+        sizer.Add(type_choice, 1, wx.LEFT, self.border)
         self.Bind(wx.EVT_CHOICE, self._evt_mol_type, type_choice)
 
         # Return the sizer.




Related Messages


Powered by MHonArc, Updated Fri Dec 10 18:20:02 2010