From aee9fe73d75be9dfe4ffc2fa09e1a6c797af4906 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 21 Jun 2002 06:54:08 +0000 Subject: [PATCH] corrected Appearance measuring routines git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dc.cpp | 10 ++++++---- src/mac/dc.cpp | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index d5f9cbac2b..eb2bc13dc4 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -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 ; } diff --git a/src/mac/dc.cpp b/src/mac/dc.cpp index d5f9cbac2b..eb2bc13dc4 100644 --- a/src/mac/dc.cpp +++ b/src/mac/dc.cpp @@ -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 ; } -- 2.45.2