mailr16782 - in /branches/uf_redesign/gui: about.py analyses/auto_model_free.py fonts.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 - 16:59:
Author: bugman
Date: Fri Jun  8 16:59:48 2012
New Revision: 16782

URL: http://svn.gna.org/viewcvs/relax?rev=16782&view=rev
Log:
Fix for the model-free about dialog - the fonts for the different titles can 
now be set.

The new font.roman_font_18 has been added, and the about dialog draw_title() 
method now takes the
alt_font arg for specifying an alternative font.


Modified:
    branches/uf_redesign/gui/about.py
    branches/uf_redesign/gui/analyses/auto_model_free.py
    branches/uf_redesign/gui/fonts.py

Modified: branches/uf_redesign/gui/about.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/about.py?rev=16782&r1=16781&r2=16782&view=diff
==============================================================================
--- branches/uf_redesign/gui/about.py (original)
+++ branches/uf_redesign/gui/about.py Fri Jun  8 16:59:48 2012
@@ -273,11 +273,20 @@
         self.dc.SetTextForeground(orig_fg)
 
 
-    def draw_title(self, text):
-        """Draw the title."""
+    def draw_title(self, text, alt_font=None):
+        """Draw the title.
+
+        @param text:        The text of the title.
+        @type text:         str
+        @keyword alt_font:  An alternative font.
+        @type alt_font:     wx.Font instance
+        """
 
         # Set the font.
-        self.dc.SetFont(font.roman_title)
+        if alt_font == None:
+            alt_font = font.roman_title
+
+        self.dc.SetFont(alt_font)
 
         # The text extent.
         x, y = self.dc.GetTextExtent(text)

Modified: branches/uf_redesign/gui/analyses/auto_model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/analyses/auto_model_free.py?rev=16782&r1=16781&r2=16782&view=diff
==============================================================================
--- branches/uf_redesign/gui/analyses/auto_model_free.py (original)
+++ branches/uf_redesign/gui/analyses/auto_model_free.py Fri Jun  8 16:59:48 
2012
@@ -98,15 +98,15 @@
 
             # The title.
             if level == TITLE:
-                self.draw_title(text, point_size=18)
+                self.draw_title(text, alt_font=font.roman_font_18)
 
             # The section.
             elif level == SECTION:
-                self.draw_title(text, point_size=14)
+                self.draw_title(text, alt_font=font.roman_font_14)
 
             # The section.
             elif level == SUBSECTION:
-                self.draw_title(text, point_size=12)
+                self.draw_title(text, alt_font=font.roman_font_12)
 
             # Paragraphs.
             elif level == PARAGRAPH:

Modified: branches/uf_redesign/gui/fonts.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/fonts.py?rev=16782&r1=16781&r2=16782&view=diff
==============================================================================
--- branches/uf_redesign/gui/fonts.py (original)
+++ branches/uf_redesign/gui/fonts.py Fri Jun  8 16:59:48 2012
@@ -69,6 +69,7 @@
         self.roman_font_12 =        wx.Font(12+scale, wx.FONTFAMILY_ROMAN, 
wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0)
         self.roman_font_14 =        wx.Font(14+scale, wx.FONTFAMILY_ROMAN, 
wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0)
         self.roman_title =          wx.Font(16+scale, wx.FONTFAMILY_ROMAN, 
wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0)
+        self.roman_font_18 =        wx.Font(18+scale, wx.FONTFAMILY_ROMAN, 
wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0)
 
 
 # Initialise the class for importing.




Related Messages


Powered by MHonArc, Updated Fri Jun 08 17:40:02 2012