dabo Commit
Revision 4395
Date: 2008-08-11 09:38:48 -0700 (Mon, 11 Aug 2008)
Author: Nate
Trac: http://svn.dabodev.com/trac/dabo/changeset/4395

Changed:
U   trunk/dabo/ui/uiwx/dEditor.py

Log:
The setDefaults method of dEditor was interfering with the setting of the 
FontFace and FontSize properties from application.  It would override the 
settings on the Wx level.  So, I pulled the setting of the font out of 
setDefaults and merged it with the setting of the font from the preference 
setting.  If there is a preference setting, it will be used.  Else, the face 
and size used are the defaults specified in the module level variables fontFace 
and fontSize.

Diff:
Modified: trunk/dabo/ui/uiwx/dEditor.py
===================================================================
--- trunk/dabo/ui/uiwx/dEditor.py       2008-08-10 16:10:54 UTC (rev 4394)
+++ trunk/dabo/ui/uiwx/dEditor.py       2008-08-11 16:38:48 UTC (rev 4395)
@@ -299,16 +299,16 @@
 #                      self._defaultsSet = True
 
                app = self.Application
+               print self._fontFace
                self._fontFace = app.getUserSetting("editor.fontface")
                self._fontSize = app.getUserSetting("editor.fontsize")
-               if self._fontFace:
-                       dabo.ui.callAfter(self.changeFontFace, self._fontFace)
-               else:
-                       self._fontFace = self.GetFont().GetFaceName()
-               if self._fontSize:
-                       dabo.ui.callAfter(self.changeFontSize, self._fontSize)
-               else:
-                       self._fontSize = self.GetFont().GetPointSize()
+               if self._fontFace is None:
+                       self._fontFace = fontFace
+               if self._fontSize is None:
+                       self._fontSize = fontSize
+               
+               dabo.ui.callAfter(self.changeFontFace, self._fontFace)
+               dabo.ui.callAfter(self.changeFontSize, self._fontSize)
 
                self._syntaxColoring = True
                self._styleTimer = StyleTimer(self)
@@ -689,13 +689,6 @@
                self._setLineNumberMarginVisibility()
                self._setCodeFoldingMarginVisibility()
 
-               # Make some styles,      The lexer defines what each style is 
used for, we
-               # just have to define what each style looks like.  This set is 
adapted from
-               # Scintilla sample property files.
-               self.setDefaultFont(fontFace, fontSize)
-               # Python styles
-               self.setPyFont(fontFace, fontSize)
-
                self.SetCaretForeground("BLUE")
 
                # Register some images for use in the AutoComplete box.




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/%(messageid)s

Reply via email to