mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
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:
parent
d865f4d733
commit
b0f64d2dcf
1 changed files with 2 additions and 8 deletions
|
@ -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)) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue