mailr16790 - /branches/uf_redesign/gui/uf_objects.py


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

Header


Content

Posted by edward on June 08, 2012 - 19:00:
Author: bugman
Date: Fri Jun  8 19:00:11 2012
New Revision: 16790

URL: http://svn.gna.org/viewcvs/relax?rev=16790&view=rev
Log:
Even more spacing and layout improvements for the GUI user function 
descriptions!


Modified:
    branches/uf_redesign/gui/uf_objects.py

Modified: branches/uf_redesign/gui/uf_objects.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/uf_objects.py?rev=16790&r1=16789&r2=16790&view=diff
==============================================================================
--- branches/uf_redesign/gui/uf_objects.py (original)
+++ branches/uf_redesign/gui/uf_objects.py Fri Jun  8 19:00:11 2012
@@ -905,10 +905,10 @@
                     x, y = text_obj.GetSizeTuple()
                     tot_y += y
 
-                    # The spacing after each element.
+                    # The spacing after each element (except the last).
                     tot_y += spacing
 
-                    # The 1.5 spacing before each section (not including the 
first).
+                    # The spacing before each section (not including the 
first).
                     if i != 0 and type == 'title':
                         tot_y += spacing
 
@@ -917,6 +917,7 @@
                     text_types.append(type)
 
         # Some extra space for who knows what?!
+        tot_y -= spacing
         tot_y += 20
 
         # Set the panel size - scrolling needed.
@@ -928,7 +929,8 @@
             panel.SetInitialSize((self._main_size, tot_y))
 
         # Add the text.
-        for i in range(len(text_elements)):
+        n = len(text_elements)
+        for i in range(n):
             # Spacing before each section (not including the first).
             if i > 1 and text_types[i] == 'title':
                 panel_sizer.AddSpacer(spacing)
@@ -936,12 +938,9 @@
             # The text.
             panel_sizer.Add(text_elements[i], 0, wx.ALIGN_LEFT, 0)
 
-            # 1.5 spacing after the synopsis (x0.5 here, x1 below).
-            if i == 0 and text_types[0] == 'synopsis':
-                panel_sizer.AddSpacer(int(spacing * 0.5))
-
-            # Spacer after all sections.
-            panel_sizer.AddSpacer(spacing)
+            # Spacer after all sections (except the end).
+            if i != n - 1:
+                panel_sizer.AddSpacer(spacing)
 
         # Set up and add the panel to the sizer.
         panel.SetSizer(panel_sizer)




Related Messages


Powered by MHonArc, Updated Fri Jun 08 19:20:02 2012