X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..63a6419cd78377e197697e5e8b28f9e2e9d96ddc:/src/osx/carbon/gdiobj.cpp diff --git a/src/osx/carbon/gdiobj.cpp b/src/osx/carbon/gdiobj.cpp index 76156134e0..f768d01bea 100644 --- a/src/osx/carbon/gdiobj.cpp +++ b/src/osx/carbon/gdiobj.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/gdiobj.cpp +// Name: src/osx/carbon/gdiobj.cpp // Purpose: wxGDIObject class // Author: Stefan Csomor // Modified by: @@ -19,7 +19,8 @@ #endif #include "wx/link.h" -#include "wx/mac/private.h" +#include "wx/osx/private.h" +#include "wx/font.h" // Linker will discard entire object file without this wxFORCE_LINK_THIS_MODULE(gdiobj) @@ -50,6 +51,9 @@ void wxStockGDIMac::OnExit() { } +extern wxFont* CreateNormalFont(); +extern wxFont* CreateSmallFont(); + const wxFont* wxStockGDIMac::GetFont(Item item) { wxFont* font = static_cast(ms_stockObject[item]); @@ -57,14 +61,31 @@ const wxFont* wxStockGDIMac::GetFont(Item item) { switch (item) { +#if wxOSX_USE_COCOA_OR_CARBON case FONT_NORMAL: font = new wxFont; +#if wxOSX_USE_ATSU_TEXT font->MacCreateFromThemeFont(kThemeSystemFont); +#else + font->MacCreateFromUIFont(kCTFontSystemFontType); +#endif break; case FONT_SMALL: font = new wxFont; +#if wxOSX_USE_ATSU_TEXT font->MacCreateFromThemeFont(kThemeSmallSystemFont); +#else + font->MacCreateFromUIFont(kCTFontSmallSystemFontType); +#endif + break; +#else + case FONT_NORMAL: + font = CreateNormalFont() ; + break; + case FONT_SMALL: + font = CreateSmallFont(); break; +#endif default: font = const_cast(super::GetFont(item)); break;