Commit 19355a42 authored by Albert Astals Cid's avatar Albert Astals Cid Committed by Albert Astals Cid
Browse files

Slight improvement to signature look&feel

Use black for text color and border (instead of default red)
Also force the date to have timezone info, i.e.
  2021-04-13T15:32:29+02:00
instead of
  2021-04-13T15:32:29
parent 05846601
Pipeline #57895 passed with stage
in 26 minutes and 18 seconds
......@@ -32,6 +32,7 @@
#include <QStack>
#include <QTemporaryFile>
#include <QTextStream>
#include <QTimeZone>
#include <QTimer>
#include <KAboutData>
......@@ -1893,9 +1894,14 @@ bool PDFGenerator::sign(const Okular::NewSignatureData &oData, const QString &rF
pData.setCertNickname(oData.certNickname());
pData.setPassword(oData.password());
pData.setPage(oData.page());
pData.setSignatureText(i18n("Signed by: %1\n\nDate: %2", oData.certSubjectCommonName(), QDateTime::currentDateTime().toString(Qt::ISODate)));
const QDateTime t = QDateTime::currentDateTime();
// This way we force the timezone info to be included in the string
const QString datetime = t.toTimeZone(t.timeZone()).toString(Qt::ISODate);
pData.setSignatureText(i18n("Signed by: %1\n\nDate: %2", oData.certSubjectCommonName(), datetime));
const Okular::NormalizedRect bRect = oData.boundingRectangle();
pData.setBoundingRectangle({bRect.left, bRect.top, bRect.width(), bRect.height()});
pData.setFontColor(Qt::black);
pData.setBorderColor(Qt::black);
if (!converter->sign(pData))
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment