dabo Commit
Revision 6986
Date: 2011-11-25 10:48:03 -0800 (Fri, 25 Nov 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6986
Changed:
U trunk/dabo/ui/uiwx/dShell.py
Log:
Corrected the way that font defaults were set; previously, passing an explicit
font to the constructor was ignored.
Diff:
Modified: trunk/dabo/ui/uiwx/dShell.py
===================================================================
--- trunk/dabo/ui/uiwx/dShell.py 2011-11-25 18:18:01 UTC (rev 6985)
+++ trunk/dabo/ui/uiwx/dShell.py 2011-11-25 18:48:03 UTC (rev 6986)
@@ -144,8 +144,17 @@
def __init__(self, parent, properties=None, attProperties=None,
*args, **kwargs):
self._isConstructed = False
- self._fontSize = 10
- self._fontFace = ""
+ # Set some reasonable font defaults.
+ self.plat = self.Application.Platform
+ if self.plat == "GTK":
+ self._fontFace = "Monospace"
+ self._fontSize = 10
+ elif self.plat == "Mac":
+ self._fontFace = "Monaco"
+ self._fontSize = 12
+ elif self.plat == "Win":
+ self._fontFace = "Courier New"
+ self._fontSize = 10
self._baseClass = dShell
preClass = wx.py.shell.Shell
dControlMixin.__init__(self, preClass, parent,
properties=properties,
@@ -154,17 +163,10 @@
def _afterInit(self):
super(dShell, self)._afterInit()
- # Set some font defaults
- self.plat = self.Application.Platform
- if self.plat == "GTK":
- self.FontFace = "Monospace"
- self.FontSize = 10
- elif self.plat == "Mac":
- self.FontFace = "Monaco"
- self.FontSize = 12
- elif self.plat == "Win":
- self.FontFace = "Courier New"
- self.FontSize = 10
+ # Need to set the properties to ensure that the changes are
propagated to the
+ # underlying STC control.
+# self.FontFace = self._fontFace
+# self.FontSize = self._fontSize
@dabo.ui.deadCheck
_______________________________________________
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/[email protected]