diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/urlbar/urlbar.cpp | 9 | ||||
-rw-r--r-- | src/webpage.h | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 292bf6c8..fa23b6c6 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -182,7 +182,10 @@ void UrlBar::paintEvent(QPaintEvent *event) { if(_tab->url().scheme() == QL1S("https")) { - backgroundColor = colorScheme.background(KColorScheme::NeutralBackground).color(); // light yellow + backgroundColor = _tab->page()->hasSslValid() + ? colorScheme.background(KColorScheme::PositiveBackground).color() + : colorScheme.background(KColorScheme::NegativeBackground).color(); + foregroundColor = colorScheme.foreground(KColorScheme::NormalText).color(); } p.setBrush(QPalette::Base, backgroundColor); @@ -461,7 +464,9 @@ IconButton *UrlBar::addRightIcon(UrlBar::icon ic) rightIcon->setToolTip(i18n("List all available RSS feeds")); break; case UrlBar::SSL: - rightIcon->setIcon(KIcon("object-locked")); + _tab->page()->hasSslValid() + ? rightIcon->setIcon(KIcon("security-high")) + : rightIcon->setIcon(KIcon("security-low")); rightIcon->setToolTip(i18n("Show SSL Info")); break; case UrlBar::BK: diff --git a/src/webpage.h b/src/webpage.h index 3f9f27de..86355395 100644 --- a/src/webpage.h +++ b/src/webpage.h @@ -79,6 +79,11 @@ public: { return _suggestedFileName; }; + + inline bool hasSslValid() + { + return _sslInfo.isValid(); + } public Q_SLOTS: void downloadAllContentsWithKGet(QPoint); |