corrected Appearance measuring routines

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2002-06-21 06:54:08 +00:00
parent 6149de710a
commit aee9fe73d7
2 changed files with 12 additions and 8 deletions

View File

@@ -1635,13 +1635,14 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
if ( useGetThemeText )
{
Point bounds={0,0} ;
SInt16 baseline ;
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
::GetThemeTextDimensions( mString,
kThemeCurrentPortFont,
kThemeStateActive,
true,
false,
&bounds,
nil );
&baseline );
CFRelease( mString ) ;
curwidth = bounds.h ;
}
@@ -1661,13 +1662,14 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
if ( useGetThemeText )
{
Point bounds={0,0} ;
SInt16 baseline ;
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
::GetThemeTextDimensions( mString,
kThemeCurrentPortFont,
kThemeStateActive,
true,
false,
&bounds,
nil );
&baseline );
CFRelease( mString ) ;
curwidth = bounds.h ;
}

View File

@@ -1635,13 +1635,14 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
if ( useGetThemeText )
{
Point bounds={0,0} ;
SInt16 baseline ;
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
::GetThemeTextDimensions( mString,
kThemeCurrentPortFont,
kThemeStateActive,
true,
false,
&bounds,
nil );
&baseline );
CFRelease( mString ) ;
curwidth = bounds.h ;
}
@@ -1661,13 +1662,14 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
if ( useGetThemeText )
{
Point bounds={0,0} ;
SInt16 baseline ;
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
::GetThemeTextDimensions( mString,
kThemeCurrentPortFont,
kThemeStateActive,
true,
false,
&bounds,
nil );
&baseline );
CFRelease( mString ) ;
curwidth = bounds.h ;
}