From b0f64d2dcf85599500c738d081ea8fe1480df11f Mon Sep 17 00:00:00 2001 From: Eike Hein Date: Wed, 13 Feb 2013 14:18:20 +0100 Subject: [PATCH] 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 --- ui/thumbnaillist.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ui/thumbnaillist.cpp b/ui/thumbnaillist.cpp index 33a543117..3e9f8d31b 100644 --- a/ui/thumbnaillist.cpp +++ b/ui/thumbnaillist.cpp @@ -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)) ); }