X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c6b938377211da1987c8b6e44134fb0f32c84df..739c5499fcab1c165b8dd0591c9fd9e2329b3cf9:/src/msw/combo.cpp diff --git a/src/msw/combo.cpp b/src/msw/combo.cpp index 51bad16e5c..2ef7d8925a 100644 --- a/src/msw/combo.cpp +++ b/src/msw/combo.cpp @@ -426,7 +426,14 @@ void wxComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) ) const wxRect& rectButton = m_btnArea; wxRect rectTextField = m_tcArea; - wxColour bgCol = GetBackgroundColour(); + + // FIXME: Either SetBackgroundColour or GetBackgroundColour + // doesn't work under Vista, so here's a temporary + // workaround. + // In the theme-less rendering code below, this fixes incorrect + // background on read-only comboboxes (they are gray, but should be + // white). + wxColour bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); #if wxUSE_UXTHEME const bool isEnabled = IsThisEnabled(); @@ -502,11 +509,6 @@ void wxComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) ) if ( useVistaComboBox ) { - // FIXME: Either SetBackgroundColour or GetBackgroundColour - // doesn't work under Vista, so here's a temporary - // workaround. - bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); - // Draw the entire control as a single button? if ( !isNonStdButton ) {