summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--viewer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/viewer.cpp b/viewer.cpp
index 71cef78..d0077f7 100644
--- a/viewer.cpp
+++ b/viewer.cpp
@@ -91,6 +91,11 @@ void Viewer::displayFile(int index){
if(index < 0){
return;
}
+ if(index == 0){
+ setBackgroundRole(QPalette::Base);
+ }else{
+ setBackgroundRole(QPalette::AlternateBase);
+ }
QPixmap pm(mFiles.at(mCurIndex));
pm = pm.scaled(mMaxSize, Qt::KeepAspectRatio, Qt::SmoothTransformation);
mLabel->setPixmap(pm);