}
int total_h = GetLineHeight(item);
- bool hasCustomBackground = false;
+ bool drawItemBackground = false;
if ( item->IsSelected() )
{
#else
dc.SetBrush(*(m_hasFocus ? m_hilightBrush : m_hilightUnfocusedBrush));
#endif
+ drawItemBackground = true;
}
else
{
wxColour colBg;
if ( attr && attr->HasBackgroundColour() )
{
- hasCustomBackground = true;
+ drawItemBackground = true;
colBg = attr->GetBackgroundColour();
}
else
// 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)
+ else if (drawItemBackground)
{
dc.DrawRectangle( item->GetX()-2, item->GetY()+offset,
item->GetWidth()+2, total_h-offset );