TorInfoDialog: dark icons on bright theme

This commit is contained in:
tobtoht 2021-07-03 00:31:18 +02:00
parent 2ed8d6bb6d
commit 801041aeaa
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -9,6 +9,7 @@
#include <QMessageBox>
#include <QPushButton>
#include "utils/ColorScheme.h"
#include "utils/Icons.h"
#include "utils/os/tails.h"
#include "utils/TorManager.h"
@ -139,9 +140,10 @@ void TorInfoDialog::initPrivacyLevel() {
ui->frame_notice->hide();
}
QPixmap iconNoTor(":/assets/images/securityLevelStandardWhite.png");
QPixmap iconNoSync(":/assets/images/securityLevelSaferWhite.png");
QPixmap iconAllTor(":/assets/images/securityLevelSafestWhite.png");
bool dark = ColorScheme::darkScheme;
QPixmap iconNoTor(dark ? ":/assets/images/securityLevelStandardWhite.png" : ":/assets/images/securityLevelStandard.png");
QPixmap iconNoSync(dark ? ":/assets/images/securityLevelSaferWhite.png" : ":/assets/images/securityLevelSafer.png");
QPixmap iconAllTor(dark ? ":/assets/images/securityLevelSafestWhite.png" : ":/assets/images/securityLevelSafest.png");
ui->icon_noTor->setPixmap(iconNoTor.scaledToHeight(16, Qt::SmoothTransformation));
ui->icon_noSync->setPixmap(iconNoSync.scaledToHeight(16, Qt::SmoothTransformation));
ui->icon_allTor->setPixmap(iconAllTor.scaledToHeight(16, Qt::SmoothTransformation));