X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6fd21e1655c2c21679fa773925bf155de395e6d0..4d572a2cace8d11a10ecea598ff342c36ec007cf:/src/osx/carbon/stattext.cpp diff --git a/src/osx/carbon/stattext.cpp b/src/osx/carbon/stattext.cpp index e51b2af2b1..90765430e8 100644 --- a/src/osx/carbon/stattext.cpp +++ b/src/osx/carbon/stattext.cpp @@ -69,15 +69,15 @@ wxSize wxStaticText::DoGetBestSize() const SInt16 baseline; if ( m_font.MacGetThemeFontID() != kThemeCurrentPortFont ) { - // GetThemeTextDimensions will cache strings and the documentation - // says not to use the NoCopy string creation calls. - // This also means that we can't use CFSTR without - // -fno-constant-cfstrings if the library might be unloaded, - // as GetThemeTextDimensions may cache a pointer to our - // unloaded segment. - wxCFStringRef str( !m_label.empty() ? m_label : wxString(" "), + // GetThemeTextDimensions will cache strings and the documentation + // says not to use the NoCopy string creation calls. + // This also means that we can't use CFSTR without + // -fno-constant-cfstrings if the library might be unloaded, + // as GetThemeTextDimensions may cache a pointer to our + // unloaded segment. + wxCFStringRef str( !m_label.empty() ? m_label : wxString(" "), GetFont().GetEncoding() ); - + err = GetThemeTextDimensions( (CFStringRef)str, m_font.MacGetThemeFontID(), kThemeStateActive, false, &bounds, &baseline );