don't hardcode grey/white colours for non-MSW/Mac in InitColours(), use wxSystemSettings for all ports (even if some of them, such as wxGTK, still hardcode white for wxSYS_COLOUR_3DHILIGHT) (replaces patch 1883386)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-02-09 15:10:13 +00:00
parent 4732e2dca9
commit ba959d4c98

View File

@@ -371,23 +371,16 @@ bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const
// Initialize colours // Initialize colours
void wxStatusBarGeneric::InitColours() void wxStatusBarGeneric::InitColours()
{ {
// Shadow colours #if defined(__WXPM__)
#if defined(__WXMSW__) || defined(__WXMAC__)
wxColour mediumShadowColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
m_mediumShadowPen = wxPen(mediumShadowColour, 1, wxSOLID);
wxColour hilightColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT));
m_hilightPen = wxPen(hilightColour, 1, wxSOLID);
#elif defined(__WXPM__)
m_mediumShadowPen = wxPen(wxColour(127, 127, 127), 1, wxSOLID); m_mediumShadowPen = wxPen(wxColour(127, 127, 127), 1, wxSOLID);
m_hilightPen = *wxWHITE_PEN; m_hilightPen = *wxWHITE_PEN;
SetBackgroundColour(*wxLIGHT_GREY); SetBackgroundColour(*wxLIGHT_GREY);
SetForegroundColour(*wxBLACK); SetForegroundColour(*wxBLACK);
#else #else // !__WXPM__
m_mediumShadowPen = *wxGREY_PEN; m_mediumShadowPen = wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
m_hilightPen = *wxWHITE_PEN; m_hilightPen = wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT));
#endif #endif // __WXPM__/!__WXPM__
} }
// Responds to colour changes, and passes event on to children. // Responds to colour changes, and passes event on to children.