]> git.saurik.com Git - wxWidgets.git/commitdiff
corrected Appearance measuring routines
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 21 Jun 2002 06:54:08 +0000 (06:54 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 21 Jun 2002 06:54:08 +0000 (06:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/dc.cpp
src/mac/dc.cpp

index d5f9cbac2bb5b327d02624916eb1836de8b3d46b..eb2bc13dc4bdd2af82fe8e85a7d679b801e67895 100644 (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 ;
         }
index d5f9cbac2bb5b327d02624916eb1836de8b3d46b..eb2bc13dc4bdd2af82fe8e85a7d679b801e67895 100644 (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 ;
         }