mailr14049 - /branches/gui_testing/gui/about.py


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

Header


Content

Posted by edward on August 02, 2011 - 09:32:
Author: bugman
Date: Tue Aug  2 09:32:36 2011
New Revision: 14049

URL: http://svn.gna.org/viewcvs/relax?rev=14049&view=rev
Log:
The about relax DC elements are now properly centred.

The border should not have been added to the x extent.


Modified:
    branches/gui_testing/gui/about.py

Modified: branches/gui_testing/gui/about.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/about.py?rev=14049&r1=14048&r2=14049&view=diff
==============================================================================
--- branches/gui_testing/gui/about.py (original)
+++ branches/gui_testing/gui/about.py Tue Aug  2 09:32:36 2011
@@ -255,7 +255,7 @@
 
         # Draw the text centred.
         if centre:
-            pos_x = self.border + (self.dim_x - x)/2
+            pos_x = (self.dim_x - x)/2
 
         # Draw the text.
         text = self.dc.DrawText(url_text, pos_x, self.offset())
@@ -288,7 +288,7 @@
         x, y = self.dc.GetTextExtent(text)
 
         # Draw the text, with a spacer.
-        self.dc.DrawText(text, self.border + (self.virt_x - x)/2, 
self.offset(15))
+        self.dc.DrawText(text, (self.virt_x - x)/2, self.offset(15))
 
         # Add the text extent.
         self.offset(y)
@@ -560,8 +560,8 @@
         x2, y2 = self.dc.GetTextExtent(self.info.copyright[1])
 
         # Draw the text, with a starting spacer.
-        self.dc.DrawText(self.info.copyright[0], self.border + (self.dim_x - 
x1)/2, self.offset(15))
-        self.dc.DrawText(self.info.copyright[1], self.border + (self.dim_x - 
x2)/2, self.offset(y1+3))
+        self.dc.DrawText(self.info.copyright[0], (self.dim_x - x1)/2, 
self.offset(15))
+        self.dc.DrawText(self.info.copyright[1], (self.dim_x - x2)/2, 
self.offset(y1+3))
 
         # Add the text extent.
         self.offset(y2)
@@ -584,7 +584,7 @@
         x, y = self.dc.GetTextExtent(self.info.desc)
 
         # Draw the text, with a spacer.
-        self.dc.DrawText(self.info.desc, self.border + (self.dim_x - x)/2, 
self.offset(15))
+        self.dc.DrawText(self.info.desc, (self.dim_x - x)/2, self.offset(15))
 
         # Add the text extent.
         self.offset(y)
@@ -594,7 +594,7 @@
         """Draw the relax icon on the canvas."""
 
         # Add the relax logo.
-        
self.dc.DrawBitmap(wx.Bitmap(IMAGE_PATH+'ulysses_shadowless_400x168.png'), 
self.border + (self.dim_x - 400)/2, self.offset(20), True)
+        
self.dc.DrawBitmap(wx.Bitmap(IMAGE_PATH+'ulysses_shadowless_400x168.png'), 
(self.dim_x - 400)/2, self.offset(20), True)
 
         # Add the bitmap width to the offset.
         self.offset(168)




Related Messages


Powered by MHonArc, Updated Tue Aug 02 10:00:01 2011