X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f2968ad0ba775e6785c3eb4a3fea5ad19352e26..c9ed413ab4f5673ffff00198dc6ce1397398bda4:/src/osx/carbon/settings.cpp diff --git a/src/osx/carbon/settings.cpp b/src/osx/carbon/settings.cpp index ad5c4f7987..bc6b13ad73 100644 --- a/src/osx/carbon/settings.cpp +++ b/src/osx/carbon/settings.cpp @@ -19,6 +19,7 @@ #endif #include "wx/osx/private.h" +#include "wx/fontenum.h" // ---------------------------------------------------------------------------- // wxSystemSettingsNative @@ -142,10 +143,12 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) // case wxSYS_COLOUR_MAX: default: resultColor = *wxWHITE; - // wxCHECK_MSG( index >= wxSYS_COLOUR_MAX, false, _T("unknown system colour index") ); + // wxCHECK_MSG( index >= wxSYS_COLOUR_MAX, false, wxT("unknown system colour index") ); break ; } + //wxASSERT(resultColor.IsOk()); + return resultColor; } @@ -155,20 +158,25 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) { + wxFont font; + switch (index) { case wxSYS_ANSI_VAR_FONT : case wxSYS_SYSTEM_FONT : case wxSYS_DEVICE_DEFAULT_FONT : case wxSYS_DEFAULT_GUI_FONT : - return *wxSMALL_FONT ; + font = *wxSMALL_FONT ; break ; default : + font = *wxNORMAL_FONT ; break ; } - return *wxNORMAL_FONT; + //wxASSERT(font.IsOk() && wxFontEnumerator::IsValidFacename(font.GetFaceName())); + + return font; } // ---------------------------------------------------------------------------- @@ -244,7 +252,7 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(w #if wxOSX_USE_CARBON return (int)(GetDblTime() * 1000. / 60.); #else - // default on mac is 30 ticks, we shouldn't really use wxSYS_DCLICK_MSEC anyway + // default on mac is 30 ticks, we shouldn't really use wxSYS_DCLICK_MSEC anyway // but rather rely on the 'click-count' by the system delivered in a mouse event return 500; #endif