mailr14591 - /1.3/gui/components/relax_data.py


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

Header


Content

Posted by edward on September 06, 2011 - 10:46:
Author: bugman
Date: Tue Sep  6 10:46:26 2011
New Revision: 14591

URL: http://svn.gna.org/viewcvs/relax?rev=14591&view=rev
Log:
Mac OS X fix for the relaxation data list element - the height algorithm is 
now more robust.

The ListCtrl.GetSize() method appears not to work on Mac OS X!?!  Therefore a 
different algorithm
has been designed to get around this Mac specific problem.


Modified:
    1.3/gui/components/relax_data.py

Modified: 1.3/gui/components/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/components/relax_data.py?rev=14591&r1=14590&r2=14591&view=diff
==============================================================================
--- 1.3/gui/components/relax_data.py (original)
+++ 1.3/gui/components/relax_data.py Tue Sep  6 10:46:26 2011
@@ -191,7 +191,10 @@
         wx.PostEvent(self.parent.GetEventHandler(), event)
 
         # Set the minimum height.
-        height = self.height_base + self.height_char * n
+        head = self.height_char + 10
+        centre = (self.height_char + 6) * n
+        foot = wx.SystemSettings_GetMetric(wx.SYS_HSCROLL_Y)
+        height = head + centre + foot
         self.element.SetMinSize((-1, height))
         self.element.Layout()
 
@@ -225,7 +228,6 @@
         self.element.SetFont(font.normal)
 
         # Store the base heights.
-        self.height_base = self.element.GetSize()[1]
         self.height_char = self.element.GetCharHeight()
 
         # Bind some events.




Related Messages


Powered by MHonArc, Updated Tue Sep 06 12:20:02 2011