diff options
Diffstat (limited to 'src/urlbar/sslwidget.cpp')
-rw-r--r-- | src/urlbar/sslwidget.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/urlbar/sslwidget.cpp b/src/urlbar/sslwidget.cpp index a9d3e9b6..8e336219 100644 --- a/src/urlbar/sslwidget.cpp +++ b/src/urlbar/sslwidget.cpp @@ -42,6 +42,9 @@ #include <QTextDocument> +const int c_dim = 16; + + SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) : QMenu(parent) , m_url(url) @@ -83,7 +86,7 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) if (cert.isNull()) { label->setText(i18n("Warning: this site is NOT carrying a certificate.")); - imageLabel->setPixmap(KIcon("security-low").pixmap(32)); + imageLabel->setPixmap(KIcon("security-low").pixmap(c_dim)); layout->addWidget(label, rows++, 1); } else @@ -93,7 +96,7 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) label->setText(i18n("The certificate for this site is valid and has been verified by:\n%1.", Qt::escape(cert.issuerInfo(QSslCertificate::CommonName)))); - imageLabel->setPixmap(KIcon("security-high").pixmap(32)); + imageLabel->setPixmap(KIcon("security-high").pixmap(c_dim)); } else { @@ -106,7 +109,7 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) label->setText(i18n("The certificate for this site is NOT valid, for the following reasons:\n%1.", c)); label->setTextFormat(Qt::RichText); - imageLabel->setPixmap(KIcon("security-low").pixmap(32)); + imageLabel->setPixmap(KIcon("security-low").pixmap(c_dim)); } layout->addWidget(label, rows++, 1); @@ -138,7 +141,7 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) label->setText(i18n("Your connection to %1 is NOT encrypted.\n", m_url.host())); layout->addWidget(label, rows++ , 1); - imageLabel->setPixmap(KIcon("security-low").pixmap(32)); + imageLabel->setPixmap(KIcon("security-low").pixmap(c_dim)); } else { @@ -152,22 +155,22 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) if (vers == QL1S("SSLv3")) { sslVersion = QL1S("SSL 3.0"); - imageLabel->setPixmap(KIcon("security-high").pixmap(32)); + imageLabel->setPixmap(KIcon("security-high").pixmap(c_dim)); } else if (vers == QL1S("SSLv2")) { sslVersion = QL1S("SSL 2.0"); - imageLabel->setPixmap(KIcon("security-low").pixmap(32)); + imageLabel->setPixmap(KIcon("security-low").pixmap(c_dim)); } else if (vers == QL1S("TLSv1")) { sslVersion = QL1S("TLS 1.0"); - imageLabel->setPixmap(KIcon("security-high").pixmap(32)); + imageLabel->setPixmap(KIcon("security-high").pixmap(c_dim)); } else { sslVersion = i18n("Unknown"); - imageLabel->setPixmap(KIcon("security-low").pixmap(32)); + imageLabel->setPixmap(KIcon("security-low").pixmap(c_dim)); } label = new QLabel(this); @@ -210,15 +213,14 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) HistoryItem() : hList.first() ; + imageLabel->setPixmap(KIcon("dialog-information").pixmap(c_dim)); if (firstVisit.visitCount == 1) { label->setText(i18n("It is your first time visiting this site.")); - imageLabel->setPixmap(KIcon("security-medium").pixmap(32)); } else { label->setText(i18n("You just visited this site.\nYour first visit was on %1.\n", firstVisit.firstDateTimeVisit.toString())); - imageLabel->setPixmap(KIcon("security-high").pixmap(32)); } layout->addWidget(label, rows++, 1); @@ -229,7 +231,7 @@ void SSLWidget::showAt(const QPoint &pos) { adjustSize(); - QPoint p(pos.x() - width(), pos.y() + 10); + QPoint p(pos.x(), pos.y() + 10); move(p); show(); } |