Corrceted background problem with themes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -55,10 +55,8 @@ bool wxPanel::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
if ( ret )
|
if ( ret )
|
||||||
{
|
{
|
||||||
#ifndef __WXGTK__
|
|
||||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||||
SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
|
SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -2891,7 +2891,8 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_wxwindow)
|
if ((m_wxwindow) &&
|
||||||
|
(m_backgroundColour != wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE)))
|
||||||
{
|
{
|
||||||
/* wxMSW doesn't clear the window here. I don't do that either to
|
/* wxMSW doesn't clear the window here. I don't do that either to
|
||||||
provide compatibility. call Clear() to do the job. */
|
provide compatibility. call Clear() to do the job. */
|
||||||
@@ -2900,17 +2901,7 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
|
|||||||
gdk_window_set_background( window, m_backgroundColour.GetColor() );
|
gdk_window_set_background( window, m_backgroundColour.GetColor() );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
|
|
||||||
if (sysbg == m_backgroundColour)
|
|
||||||
{
|
|
||||||
m_backgroundColour = wxNullColour;
|
|
||||||
ApplyWidgetStyle();
|
ApplyWidgetStyle();
|
||||||
m_backgroundColour = sysbg;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ApplyWidgetStyle();
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -2943,17 +2934,7 @@ bool wxWindow::SetForegroundColour( const wxColour &colour )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
|
|
||||||
if ( sysbg == m_backgroundColour )
|
|
||||||
{
|
|
||||||
m_backgroundColour = wxNullColour;
|
|
||||||
ApplyWidgetStyle();
|
ApplyWidgetStyle();
|
||||||
m_backgroundColour = sysbg;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ApplyWidgetStyle();
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -2891,7 +2891,8 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_wxwindow)
|
if ((m_wxwindow) &&
|
||||||
|
(m_backgroundColour != wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE)))
|
||||||
{
|
{
|
||||||
/* wxMSW doesn't clear the window here. I don't do that either to
|
/* wxMSW doesn't clear the window here. I don't do that either to
|
||||||
provide compatibility. call Clear() to do the job. */
|
provide compatibility. call Clear() to do the job. */
|
||||||
@@ -2900,17 +2901,7 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
|
|||||||
gdk_window_set_background( window, m_backgroundColour.GetColor() );
|
gdk_window_set_background( window, m_backgroundColour.GetColor() );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
|
|
||||||
if (sysbg == m_backgroundColour)
|
|
||||||
{
|
|
||||||
m_backgroundColour = wxNullColour;
|
|
||||||
ApplyWidgetStyle();
|
ApplyWidgetStyle();
|
||||||
m_backgroundColour = sysbg;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ApplyWidgetStyle();
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -2943,17 +2934,7 @@ bool wxWindow::SetForegroundColour( const wxColour &colour )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
|
|
||||||
if ( sysbg == m_backgroundColour )
|
|
||||||
{
|
|
||||||
m_backgroundColour = wxNullColour;
|
|
||||||
ApplyWidgetStyle();
|
ApplyWidgetStyle();
|
||||||
m_backgroundColour = sysbg;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ApplyWidgetStyle();
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user