X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5573f5b828ea7388a25df8402145b149e95c06ad..a56a99abe859f37615251c865bc807bf13e8b180:/src/msw/settings.cpp?ds=sidebyside diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index 85f5a95a47..591b4f7c63 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -127,7 +127,12 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) 0, // MENUBAR (unused) }; - if ( index == wxSYS_COLOUR_LISTBOX ) + if ( index == wxSYS_COLOUR_LISTBOXTEXT) + { + // there is no standard colour with this index, map to another one + index = wxSYS_COLOUR_WINDOWTEXT; + } + else if ( index == wxSYS_COLOUR_LISTBOX ) { // there is no standard colour with this index, map to another one index = wxSYS_COLOUR_WINDOW; @@ -377,11 +382,14 @@ static const int gs_metricsMap[] = #else -1, #endif + // SM_SWAPBUTTON is not available under CE and it doesn't make sense to ask + // for it there #ifdef SM_SWAPBUTTON SM_SWAPBUTTON, #else - -1 + -1, #endif + -1 // wxSYS_DCLICK_MSEC - not available as system metric }; // Get a system metric, e.g. scrollbar size @@ -394,6 +402,12 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(w wxCHECK_MSG( index > 0 && (size_t)index < WXSIZEOF(gs_metricsMap), 0, _T("invalid metric") ); + if ( index == wxSYS_DCLICK_MSEC ) + { + // This one is not a Win32 system metric + return ::GetDoubleClickTime(); + } + int indexMSW = gs_metricsMap[index]; if ( indexMSW == -1 ) {