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
This commit is contained in:
@@ -72,7 +72,7 @@ bool wxStatusBarUniv::Create(wxWindow *parent,
|
||||
}
|
||||
|
||||
SetFieldsCount(1);
|
||||
|
||||
|
||||
CreateInputHandler(wxINP_HANDLER_STATUSBAR);
|
||||
|
||||
SetSize(DoGetBestSize());
|
||||
|
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user