From aeb3c1cb523f18a93804c6cd67e00e8fe8699198 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 13 Jan 2004 14:48:35 +0000 Subject: [PATCH] Improved colours in wxUniv -- white (window colour) was being used as the default. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/statusbr.cpp | 2 +- src/univ/themes/win32.cpp | 30 +++++++++++++++++++++--------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/univ/statusbr.cpp b/src/univ/statusbr.cpp index 6e775a60fc..71ffd980dd 100644 --- a/src/univ/statusbr.cpp +++ b/src/univ/statusbr.cpp @@ -72,7 +72,7 @@ bool wxStatusBarUniv::Create(wxWindow *parent, } SetFieldsCount(1); - + CreateInputHandler(wxINP_HANDLER_STATUSBAR); SetSize(DoGetBestSize()); diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 24e9cd5eb8..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 { -- 2.45.2