SetFont fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1555,8 +1555,8 @@ class ScaledTextBox(TextObjectMixin, DrawObject):
|
|||||||
DrawingSize = self.LayoutFontSize # pts This effectively determines the resolution that the BB is computed to.
|
DrawingSize = self.LayoutFontSize # pts This effectively determines the resolution that the BB is computed to.
|
||||||
ScaleFactor = float(self.Size) / DrawingSize
|
ScaleFactor = float(self.Size) / DrawingSize
|
||||||
Width = (self.Width - 2*self.PadSize) / ScaleFactor #Width to wrap to
|
Width = (self.Width - 2*self.PadSize) / ScaleFactor #Width to wrap to
|
||||||
dc.SetFont(self.SetFont(DrawingSize, self.Family, self.Style, self.Weight, self.Underlined, self.FaceName) )
|
self.SetFont(DrawingSize, self.Family, self.Style, self.Weight, self.Underlined, self.FaceName)
|
||||||
|
dc.SetFont(self.Font)
|
||||||
NewStrings = []
|
NewStrings = []
|
||||||
for s in self.Strings:
|
for s in self.Strings:
|
||||||
#beginning = True
|
#beginning = True
|
||||||
@@ -1605,8 +1605,8 @@ class ScaledTextBox(TextObjectMixin, DrawObject):
|
|||||||
DrawingSize = self.LayoutFontSize # pts This effectively determines the resolution that the BB is computed to.
|
DrawingSize = self.LayoutFontSize # pts This effectively determines the resolution that the BB is computed to.
|
||||||
ScaleFactor = float(self.Size) / DrawingSize
|
ScaleFactor = float(self.Size) / DrawingSize
|
||||||
|
|
||||||
dc.SetFont(self.SetFont(DrawingSize, self.Family, self.Style, self.Weight, self.Underlined, self.FaceName) )
|
self.SetFont(DrawingSize, self.Family, self.Style, self.Weight, self.Underlined, self.FaceName)
|
||||||
|
dc.SetFont(self.Font)
|
||||||
TextHeight = dc.GetTextExtent("X")[1]
|
TextHeight = dc.GetTextExtent("X")[1]
|
||||||
SpaceWidth = dc.GetTextExtent(" ")[0]
|
SpaceWidth = dc.GetTextExtent(" ")[0]
|
||||||
LineHeight = TextHeight * self.LineSpacing
|
LineHeight = TextHeight * self.LineSpacing
|
||||||
@@ -1690,8 +1690,8 @@ class ScaledTextBox(TextObjectMixin, DrawObject):
|
|||||||
## note that this limit is dependent on how much memory you have, etc.
|
## note that this limit is dependent on how much memory you have, etc.
|
||||||
Size = min(Size, self.MaxFontSize)
|
Size = min(Size, self.MaxFontSize)
|
||||||
|
|
||||||
font = self.SetFont(Size, self.Family, self.Style, self.Weight, self.Underlined, self.FaceName)
|
self.SetFont(Size, self.Family, self.Style, self.Weight, self.Underlined, self.FaceName)
|
||||||
dc.SetFont(font)
|
dc.SetFont(self.Font)
|
||||||
dc.SetTextForeground(self.Color)
|
dc.SetTextForeground(self.Color)
|
||||||
dc.SetBackgroundMode(wx.TRANSPARENT)
|
dc.SetBackgroundMode(wx.TRANSPARENT)
|
||||||
|
|
||||||
@@ -2468,7 +2468,9 @@ class FloatCanvas(wx.Panel):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
self._HTBitmap = wx.EmptyBitmap(self.PanelSize[0],
|
self._HTBitmap = wx.EmptyBitmap(self.PanelSize[0],
|
||||||
|
|
||||||
self.PanelSize[1],
|
self.PanelSize[1],
|
||||||
|
|
||||||
depth=self.HitTestBitmapDepth)
|
depth=self.HitTestBitmapDepth)
|
||||||
|
|
||||||
def MakeNewForegroundHTBitmap(self):
|
def MakeNewForegroundHTBitmap(self):
|
||||||
@@ -2480,7 +2482,9 @@ class FloatCanvas(wx.Panel):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
self._ForegroundHTBitmap = wx.EmptyBitmap(self.PanelSize[0],
|
self._ForegroundHTBitmap = wx.EmptyBitmap(self.PanelSize[0],
|
||||||
|
|
||||||
self.PanelSize[1],
|
self.PanelSize[1],
|
||||||
|
|
||||||
depth=self.HitTestBitmapDepth)
|
depth=self.HitTestBitmapDepth)
|
||||||
|
|
||||||
def OnSize(self, event=None):
|
def OnSize(self, event=None):
|
||||||
|
Reference in New Issue
Block a user