git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33845
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
}
int total_h = GetLineHeight(item);
}
int total_h = GetLineHeight(item);
+ bool hasCustomBackground = false;
if ( item->IsSelected() )
{
if ( item->IsSelected() )
{
{
wxColour colBg;
if ( attr && attr->HasBackgroundColour() )
{
wxColour colBg;
if ( attr && attr->HasBackgroundColour() )
+ {
+ hasCustomBackground = true;
colBg = attr->GetBackgroundColour();
colBg = attr->GetBackgroundColour();
else
colBg = m_backgroundColour;
dc.SetBrush(wxBrush(colBg, wxSOLID));
else
colBg = m_backgroundColour;
dc.SetBrush(wxBrush(colBg, wxSOLID));
dc.DrawRectangle( item->GetX() + image_w - 2, item->GetY()+offset,
item->GetWidth() - image_w + 2, total_h-offset );
}
dc.DrawRectangle( item->GetX() + image_w - 2, item->GetY()+offset,
item->GetWidth() - image_w + 2, total_h-offset );
}
+ // On GTK+ 2, drawing a 'normal' background is wrong for themes that
+ // don't allow backgrounds to be customized. Not drawing the background,
+ // except for custom item backgrounds, works for both kinds of theme.
+ else if (hasCustomBackground)
{
dc.DrawRectangle( item->GetX()-2, item->GetY()+offset,
item->GetWidth()+2, total_h-offset );
{
dc.DrawRectangle( item->GetX()-2, item->GetY()+offset,
item->GetWidth()+2, total_h-offset );