mailr16788 - /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 - 18:38:
Author: bugman
Date: Fri Jun  8 18:38:13 2012
New Revision: 16788

URL: http://svn.gna.org/viewcvs/relax?rev=16788&view=rev
Log:
More layout fixes 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=16788&r1=16787&r2=16788&view=diff
==============================================================================
--- branches/uf_redesign/gui/uf_objects.py (original)
+++ branches/uf_redesign/gui/uf_objects.py Fri Jun  8 18:38:13 2012
@@ -884,25 +884,25 @@
                             else:
                                 text += "    %s:  %s\n" % (element[j][0], 
element[j][1])
 
-                    # The text.
-                    text = wx.StaticText(panel, -1, text, 
style=wx.TE_MULTILINE)
+                    # The text object.
+                    text_obj = wx.StaticText(panel, -1, text, 
style=wx.TE_MULTILINE)
 
                     # Format.
                     if type == 'title':
-                        text.SetFont(font.subtitle)
+                        text_obj.SetFont(font.subtitle)
                     elif type == 'paragraph':
-                        text.SetFont(font.normal)
+                        text_obj.SetFont(font.normal)
                     elif type in ['table', 'verbatim']:
-                        text.SetFont(font.modern_small)
+                        text_obj.SetFont(font.modern_small)
                     else:
-                        text.SetFont(font.normal)
-
-                    # Wrap the paragraphs and lists.
+                        text_obj.SetFont(font.normal)
+
+                    # Wrap the paragraphs and lists (with spacing for 
scrollbars).
                     if type in ['paragraph', 'list', 'item list']:
-                        text.Wrap(self._main_size)
+                        text_obj.Wrap(self._main_size - 20)
 
                     # The text size.
-                    x, y = text.GetSizeTuple()
+                    x, y = text_obj.GetSizeTuple()
                     tot_y += y
 
                     # The spacing after each element.
@@ -913,25 +913,18 @@
                         tot_y += spacing
 
                     # Append the text objects.
-                    text_elements.append(text)
+                    text_elements.append(text_obj)
                     text_types.append(type)
 
         # Some extra space for who knows what?!
         tot_y += 20
 
-        # Scrolling needed.
+        # Set the panel size - scrolling needed.
         if tot_y > max_y:
-            # Rewrap the text to fit scrollbars in.
-            for i in range(len(text_elements)):
-                if text_types[i] in ['synopsis', 'paragraph', 'list', 'item 
list']:
-                    text_elements[i].Wrap(self._main_size - 20)
-
-            # Set the panel size.
             panel.SetInitialSize((self._main_size, max_y))
 
-        # No scrolling.
+        # Set the panel size - no scrolling.
         else:
-            # Set the panel size.
             panel.SetInitialSize((self._main_size, tot_y))
 
         # Add the text.




Related Messages


Powered by MHonArc, Updated Fri Jun 08 19:00:01 2012