bugfix : text background when using appearance text drawing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
4abac0c027
commit
5fa00d2425
@ -1379,6 +1379,21 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
{
|
||||
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
||||
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
|
||||
if ( m_backgroundMode != wxTRANSPARENT )
|
||||
{
|
||||
Point bounds={0,0} ;
|
||||
Rect background = frame ;
|
||||
SInt16 baseline ;
|
||||
::GetThemeTextDimensions( mString,
|
||||
kThemeCurrentPortFont,
|
||||
kThemeStateActive,
|
||||
false,
|
||||
&bounds,
|
||||
&baseline );
|
||||
background.right = background.left + bounds.h ;
|
||||
background.bottom = background.top + bounds.v ;
|
||||
::EraseRect( &background ) ;
|
||||
}
|
||||
::DrawThemeTextBox( mString,
|
||||
kThemeCurrentPortFont,
|
||||
kThemeStateActive,
|
||||
@ -1405,6 +1420,21 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
{
|
||||
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
||||
CFStringRef mString = CFStringCreateWithCString( NULL , text + laststop , kCFStringEncodingMacRoman ) ;
|
||||
if ( m_backgroundMode != wxTRANSPARENT )
|
||||
{
|
||||
Point bounds={0,0} ;
|
||||
Rect background = frame ;
|
||||
SInt16 baseline ;
|
||||
::GetThemeTextDimensions( mString,
|
||||
kThemeCurrentPortFont,
|
||||
kThemeStateActive,
|
||||
false,
|
||||
&bounds,
|
||||
&baseline );
|
||||
background.right = background.left + bounds.h ;
|
||||
background.bottom = background.top + bounds.v ;
|
||||
::EraseRect( &background ) ;
|
||||
}
|
||||
::DrawThemeTextBox( mString,
|
||||
kThemeCurrentPortFont,
|
||||
kThemeStateActive,
|
||||
|
@ -1379,6 +1379,21 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
{
|
||||
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
||||
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
|
||||
if ( m_backgroundMode != wxTRANSPARENT )
|
||||
{
|
||||
Point bounds={0,0} ;
|
||||
Rect background = frame ;
|
||||
SInt16 baseline ;
|
||||
::GetThemeTextDimensions( mString,
|
||||
kThemeCurrentPortFont,
|
||||
kThemeStateActive,
|
||||
false,
|
||||
&bounds,
|
||||
&baseline );
|
||||
background.right = background.left + bounds.h ;
|
||||
background.bottom = background.top + bounds.v ;
|
||||
::EraseRect( &background ) ;
|
||||
}
|
||||
::DrawThemeTextBox( mString,
|
||||
kThemeCurrentPortFont,
|
||||
kThemeStateActive,
|
||||
@ -1405,6 +1420,21 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
{
|
||||
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
||||
CFStringRef mString = CFStringCreateWithCString( NULL , text + laststop , kCFStringEncodingMacRoman ) ;
|
||||
if ( m_backgroundMode != wxTRANSPARENT )
|
||||
{
|
||||
Point bounds={0,0} ;
|
||||
Rect background = frame ;
|
||||
SInt16 baseline ;
|
||||
::GetThemeTextDimensions( mString,
|
||||
kThemeCurrentPortFont,
|
||||
kThemeStateActive,
|
||||
false,
|
||||
&bounds,
|
||||
&baseline );
|
||||
background.right = background.left + bounds.h ;
|
||||
background.bottom = background.top + bounds.v ;
|
||||
::EraseRect( &background ) ;
|
||||
}
|
||||
::DrawThemeTextBox( mString,
|
||||
kThemeCurrentPortFont,
|
||||
kThemeStateActive,
|
||||
|
Loading…
Reference in New Issue
Block a user