connect(actionDisplayMnemonic, &QAction::triggered, this, [this]() {
displayMnemonic(_accountState->account()->e2e()->_mnemonic);
});
+
_ui->encryptionMessage->setText(tr("End-to-End encryption has been enabled for this account"));
+ _ui->encryptionMessage->setIcon(Theme::createIconFromSvgResource(QStringLiteral(":/client/theme/colored/state-ok.svg")));
_ui->encryptionMessage->show();
}
return createColorAwarePixmap(name, QGuiApplication::palette());
}
+QIcon Theme::createIconFromSvgResource(const QString &resourcePath)
+{
+ QSvgRenderer renderer(resourcePath);
+
+ QImage img(64, 64, QImage::Format_ARGB32);
+ img.fill(Qt::GlobalColor::transparent);
+
+ QPainter imgPainter(&img);
+ renderer.render(&imgPainter);
+
+ QIcon icon(QPixmap::fromImage(img));
+
+ return icon;
+}
+
bool Theme::showVirtualFilesOption() const
{
const auto vfsMode = bestAvailableVfsMode();
*/
static QPixmap createColorAwarePixmap(const QString &name);
+ static QIcon createIconFromSvgResource(const QString &resourcePath);
/**
* @brief Whether to show the option to create folders using "virtual files".