Don't inherit background from parent if we're top-level

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2005-02-21 11:41:59 +00:00
parent 26da541358
commit aac97549ab
2 changed files with 4 additions and 4 deletions

View File

@ -3977,10 +3977,10 @@ void wxWindowGTK::GtkSendPaintEvents()
// widget to draw on
GtkPizza *pizza = GTK_PIZZA (m_wxwindow);
if (GetThemeEnabled() && (GetBackgroundStyle() == wxBG_STYLE_SYSTEM) && !IsTopLevel())
if (GetThemeEnabled() && (GetBackgroundStyle() == wxBG_STYLE_SYSTEM))
{
// find ancestor from which to steal background
wxWindow *parent = GetParent();
wxWindow *parent = IsTopLevel() ? this : GetParent();
while (parent && !parent->IsTopLevel())
parent = parent->GetParent();
if (!parent)

View File

@ -3977,10 +3977,10 @@ void wxWindowGTK::GtkSendPaintEvents()
// widget to draw on
GtkPizza *pizza = GTK_PIZZA (m_wxwindow);
if (GetThemeEnabled() && (GetBackgroundStyle() == wxBG_STYLE_SYSTEM) && !IsTopLevel())
if (GetThemeEnabled() && (GetBackgroundStyle() == wxBG_STYLE_SYSTEM))
{
// find ancestor from which to steal background
wxWindow *parent = GetParent();
wxWindow *parent = IsTopLevel() ? this : GetParent();
while (parent && !parent->IsTopLevel())
parent = parent->GetParent();
if (!parent)