From 27adb8ba2103540241489f8cb25c5f59d08b732b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 4 Apr 2004 12:55:18 +0000 Subject: [PATCH] always use SYSTEM_FONT under CE, it doesn't have any others git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/settings.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index 633f9bd50c..bad418ac1e 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -249,6 +249,17 @@ wxFont wxCreateFontFromStockObject(int index) wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) { +#ifdef __WXWINCE__ + // under CE only a single SYSTEM_FONT exists + index; + + if ( !gs_fontDefault ) + { + gs_fontDefault = new wxFont(wxCreateFontFromStockObject(SYSTEM_FONT)); + } + + return *gs_fontDefault; +#else // !__WXWINCE__ // wxWindow ctor calls GetSystemFont(wxSYS_DEFAULT_GUI_FONT) so we're // called fairly often -- this is why we cache this particular font const bool isDefaultRequested = index == wxSYS_DEFAULT_GUI_FONT; @@ -267,6 +278,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) } return font; +#endif // __WXWINCE__/!__WXWINCE__ } // ----------------------------------------------------------------------------