From a7736d41300bfa9a045cb98453494d26d0bccea4 Mon Sep 17 00:00:00 2001 From: nowrep Date: Wed, 7 Dec 2011 21:32:47 +0100 Subject: [PATCH] Finally fixed site icon for qupzilla: scheme pages - for some reason, Qt 4.8 does not load site icon from qrc: scheme (and also data: scheme) correctly --- src/webview/tabwidget.cpp | 2 +- src/webview/webview.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/webview/tabwidget.cpp b/src/webview/tabwidget.cpp index bffa0708c..b9083b64f 100644 --- a/src/webview/tabwidget.cpp +++ b/src/webview/tabwidget.cpp @@ -206,7 +206,7 @@ void TabWidget::aboutToShowTabsMenu() action->setIcon(QIcon(":/icons/menu/dot.png")); } else { - action->setIcon(_iconForUrl(view->url())); + action->setIcon(view->siteIcon()); } if (view->title().isEmpty()) { if (view->isLoading()) { diff --git a/src/webview/webview.cpp b/src/webview/webview.cpp index 4616afe9a..c7a37451c 100644 --- a/src/webview/webview.cpp +++ b/src/webview/webview.cpp @@ -267,7 +267,7 @@ QLabel* WebView::animationLoading(int index, bool addMovie) QLabel* loadingAnimation = qobject_cast(tabWidget()->getTabBar()->tabButton(index, QTabBar::LeftSide)); if (!loadingAnimation) { loadingAnimation = new QLabel(); - loadingAnimation->setStyleSheet("margin: 0px; padding: 0px; width: 16px; height: 16px;"); +// loadingAnimation->setStyleSheet("margin: 0px; padding: 0px; width: 16px; height: 16px;"); } if (addMovie && !loadingAnimation->movie()) { QMovie* movie = new QMovie(":icons/other/progress.gif", QByteArray(), loadingAnimation); @@ -344,12 +344,17 @@ void WebView::iconChanged() QIcon WebView::siteIcon() { + if (url().scheme() == "qupzilla") { + return QIcon(":icons/qupzilla.png"); + } + if (!icon().isNull()) { return icon(); } if (!m_siteIcon.isNull()) { return m_siteIcon; } + return _iconForUrl(url()); }