X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/230205aec528c1224b7f95981b61defbab9a92e2..6afa47d63d56094958ed4d2528bf45ad67340954:/src/univ/themes/win32.cpp diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 8629507e49..426420ec26 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -38,6 +38,7 @@ #include "wx/scrolbar.h" #include "wx/slider.h" #include "wx/textctrl.h" + #include "wx/listbox.h" #include "wx/toolbar.h" #ifdef __WXMSW__ @@ -1333,18 +1334,29 @@ wxColour wxWin32ColourScheme::GetBackground(wxWindow *win) const if ( !win->ShouldInheritColours() ) { wxTextCtrl *text = wxDynamicCast(win, wxTextCtrl); - if ( text ) +#if wxUSE_LISTBOX + wxListBox* listBox = wxDynamicCast(win, wxListBox); +#endif + if ( text +#if wxUSE_LISTBOX + || listBox +#endif + ) { - if ( !text->IsEnabled() ) // not IsEditable() + if ( !win->IsEnabled() ) // not IsEditable() col = Get(CONTROL); - //else: execute code below - } - - if ( !col.Ok() ) - { - // doesn't depend on the state - col = Get(WINDOW); + else + { + if ( !col.Ok() ) + { + // doesn't depend on the state + col = Get(WINDOW); + } + } } + + if (!col.Ok()) + col = Get(CONTROL); // Most controls should be this colour, not WINDOW } else { @@ -3598,7 +3610,6 @@ void wxWin32Renderer::DrawFrameTitleBar(wxDC& dc, DrawFrameButton(dc, x, y, wxTOPLEVEL_BUTTON_HELP, (specialButton == wxTOPLEVEL_BUTTON_HELP) ? specialButtonFlags : 0); - x -= FRAME_BUTTON_WIDTH; } } }