X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3b9ba64cce90f096763d70915fd459bfdf6a57d3..b2edb8f3c524f302b727386bb0a694c44fb57e7d:/src/msw/combo.cpp diff --git a/src/msw/combo.cpp b/src/msw/combo.cpp index f30d15982e..9d63aa4830 100644 --- a/src/msw/combo.cpp +++ b/src/msw/combo.cpp @@ -221,53 +221,6 @@ wxComboCtrl::~wxComboCtrl() { } -void wxComboCtrl::OnThemeChange() -{ - // there doesn't seem to be any way to get the text colour using themes - // API: TMT_TEXTCOLOR doesn't work neither for EDIT nor COMBOBOX - if ( !m_hasFgCol ) - { - wxColour fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); - SetForegroundColour(fgCol); - m_hasFgCol = false; - } - - wxColour bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); - -#if wxUSE_UXTHEME - wxUxThemeEngine * const theme = wxUxThemeEngine::GetIfActive(); - if ( theme ) - { - // NB: use EDIT, not COMBOBOX (the latter works in XP but not Vista) - wxUxThemeHandle hTheme(this, L"EDIT"); - COLORREF col; - HRESULT hr = theme->GetThemeColor - ( - hTheme, - EP_EDITTEXT, - ETS_NORMAL, - TMT_FILLCOLOR, - &col - ); - if ( SUCCEEDED(hr) ) - { - bgCol = wxRGBToColour(col); - } - else - { - wxLogApiError("GetThemeColor(EDIT, ETS_NORMAL, TMT_FILLCOLOR)", - hr); - } - } -#endif - - if ( !m_hasBgCol ) - { - SetBackgroundColour(bgCol); - m_hasBgCol = false; - } -} - void wxComboCtrl::OnResize() { // @@ -878,6 +831,8 @@ bool wxComboCtrl::IsKeyPopupToggle(const wxKeyEvent& event) const case WXK_DOWN: case WXK_UP: + case WXK_NUMPAD_DOWN: + case WXK_NUMPAD_UP: // On XP or with writable combo in Classic, arrows don't open the // popup but Alt-arrow does if ( event.AltDown() ||