From 801041aeaad6077ba71ae13a9840b4cc679a9031 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sat, 3 Jul 2021 00:31:18 +0200 Subject: [PATCH] TorInfoDialog: dark icons on bright theme --- src/dialog/TorInfoDialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dialog/TorInfoDialog.cpp b/src/dialog/TorInfoDialog.cpp index 583ace3..47d6f70 100644 --- a/src/dialog/TorInfoDialog.cpp +++ b/src/dialog/TorInfoDialog.cpp @@ -9,6 +9,7 @@ #include #include +#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));