Don't change the tree fonts when running on the older comctl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1539,11 +1539,18 @@ class wxPythonDemo(wx.Frame):
|
|||||||
|
|
||||||
treeFont = self.tree.GetFont()
|
treeFont = self.tree.GetFont()
|
||||||
catFont = self.tree.GetFont()
|
catFont = self.tree.GetFont()
|
||||||
treeFont.SetPointSize(10)
|
|
||||||
|
# The old native treectrl on MSW has a bug where it doesn't
|
||||||
|
# draw all of the text for an item if the font is larger than
|
||||||
|
# the default. It seems to be clipping the item's label as if
|
||||||
|
# it was the size of the same label in the default font.
|
||||||
|
if 'wxMSW' not in wx.PlatformInfo or wx.GetApp().GetComCtl32Version() >= 600:
|
||||||
|
treeFont.SetPointSize(treeFont.GetPointSize()+2)
|
||||||
treeFont.SetWeight(wx.BOLD)
|
treeFont.SetWeight(wx.BOLD)
|
||||||
self.tree.SetItemFont(self.root, treeFont)
|
|
||||||
catFont.SetWeight(wx.BOLD)
|
catFont.SetWeight(wx.BOLD)
|
||||||
|
|
||||||
|
self.tree.SetItemFont(self.root, treeFont)
|
||||||
|
|
||||||
firstChild = None
|
firstChild = None
|
||||||
selectItem = None
|
selectItem = None
|
||||||
filter = self.filter.GetValue()
|
filter = self.filter.GetValue()
|
||||||
|
Reference in New Issue
Block a user