From a3f720638b09a97e58cd8a8a94c5ecaa58afa322 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 14 Sep 2018 12:28:29 +0200 Subject: Make origin distinct when comparing images Paint background with QPalette::Base when showing the first image. --- viewer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'viewer.cpp') 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); -- cgit v1.2.3-70-g09d2