mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Use security state icon in popup location bar
Reviewers: drosca Reviewed By: drosca Subscribers: falkon Tags: #falkon Differential Revision: https://phabricator.kde.org/D12666
This commit is contained in:
parent
dd8d8b9007
commit
b6edd26ca0
@ -106,5 +106,14 @@ void PopupLocationBar::showUrl(const QUrl &url)
|
||||
|
||||
void PopupLocationBar::showSiteIcon()
|
||||
{
|
||||
m_siteIcon->setIcon(m_view->icon());
|
||||
QIcon icon = IconProvider::emptyWebIcon();
|
||||
if (property("secured").toBool()) {
|
||||
icon = QIcon::fromTheme(QSL("document-encrypted"), icon);
|
||||
}
|
||||
m_siteIcon->setIcon(QIcon(icon.pixmap(16)));
|
||||
}
|
||||
|
||||
void PopupLocationBar::setPrivacyState(bool state)
|
||||
{
|
||||
setProperty("secured", QVariant(state));
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ public:
|
||||
public Q_SLOTS:
|
||||
void showUrl(const QUrl &url);
|
||||
void showSiteIcon();
|
||||
void setPrivacyState(bool state);
|
||||
|
||||
private:
|
||||
PopupWebView* m_view;
|
||||
|
@ -143,6 +143,7 @@ PopupWindow::PopupWindow(PopupWebView* view)
|
||||
connect(m_view, &WebView::loadStarted, this, &PopupWindow::loadStarted);
|
||||
connect(m_view, &WebView::loadProgress, this, &PopupWindow::loadProgress);
|
||||
connect(m_view, &WebView::loadFinished, this, &PopupWindow::loadFinished);
|
||||
connect(m_view, &WebView::privacyChanged, m_locationBar, &PopupLocationBar::setPrivacyState);
|
||||
|
||||
auto pageChanged = [this](WebPage *page) {
|
||||
connect(page, &WebPage::linkHovered, this, &PopupWindow::showStatusBarMessage);
|
||||
|
Loading…
Reference in New Issue
Block a user