Get rid of window background-colored bars between thumbnail containers.

This seems to be what the original code wanted to achieve, but failed
due to a convoluted approach of setting the color of the current back-
ground role to a default palette's Base color ... instead we just leave
the palette untouched and set the correct background role now. Visual
noise be gone, yay.

CCMAIL:wstephenson@kde.org
This commit is contained in:
Eike Hein 2013-02-13 14:18:20 +01:00
parent d865f4d733
commit b0f64d2dcf

View file

@ -209,19 +209,13 @@ ThumbnailList::ThumbnailList( QWidget *parent, Okular::Document *document )
setAcceptDrops( true );
QPalette pal = palette();
// set contents background to the 'base' color
QPalette viewportPal = viewport()->palette();
viewportPal.setColor( viewport()->backgroundRole(), pal.color( QPalette::Base ) );
viewport()->setPalette( viewportPal );
viewport()->setBackgroundRole( QPalette::Base );
setWidget( d );
// widget setup: can be focused by mouse click (not wheel nor tab)
widget()->setFocusPolicy( Qt::ClickFocus );
widget()->show();
QPalette widgetPal = widget()->palette();
widgetPal.setColor( widget()->backgroundRole(), pal.color( QPalette::Base ) );
widget()->setPalette( widgetPal );
widget()->setBackgroundRole( QPalette::Base );
connect( verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(slotRequestVisiblePixmaps(int)) );
}