]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/dc.cpp
don't cache the result of IsAlwaysConnected() and don't call IsOnline() unnecessarily...
[wxWidgets.git] / src / mac / dc.cpp
index d5f9cbac2bb5b327d02624916eb1836de8b3d46b..364c45fcf105dd6edc3f61dd797a38dfdb77d370 100644 (file)
@@ -1464,6 +1464,7 @@ void  wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
        long yy = YLOG2DEVMAC(y);
 #if TARGET_CARBON
        bool useDrawThemeText = ( DrawThemeTextBox != (void*) kUnresolvedCFragSymbolAddress ) ;
+       useDrawThemeText = false ;
 #endif
        MacInstallFont() ;
     if ( 0 )
@@ -1525,7 +1526,7 @@ void  wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
                        ::DrawThemeTextBox( mString,
                                                                kThemeCurrentPortFont,
                                                                kThemeStateActive,
-                                                               true,
+                                                               false,
                                                                &frame,
                                                                teJustLeft,
                                                                nil );
@@ -1551,7 +1552,7 @@ void  wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
                ::DrawThemeTextBox( mString,
                                                        kThemeCurrentPortFont,
                                                        kThemeStateActive,
-                                                       true,
+                                                       false,
                                                        &frame,
                                                        teJustLeft,
                                                        nil );
@@ -1594,6 +1595,7 @@ void  wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
        ::GetFontInfo( &fi ) ;
 #if TARGET_CARBON      
        bool useGetThemeText = ( GetThemeTextDimensions != (void*) kUnresolvedCFragSymbolAddress ) ;
+       useGetThemeText = false ;
 #endif
 
        if ( height )
@@ -1635,13 +1637,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 +1664,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 ;
         }