1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-22 02:02:10 +02:00

TabIcon: Hide icon immediately when url is empty or has qupzilla: scheme

This commit is contained in:
David Rosca 2017-02-07 09:29:21 +01:00
parent 118427db86
commit 5873ed48fd
2 changed files with 7 additions and 2 deletions

View File

@ -90,7 +90,11 @@ void TabIcon::updateIcon()
{ {
m_sitePixmap = m_tab->icon(/*allowNull*/ true).pixmap(16); m_sitePixmap = m_tab->icon(/*allowNull*/ true).pixmap(16);
if (m_sitePixmap.isNull()) { if (m_sitePixmap.isNull()) {
m_hideTimer->start(); if (m_tab->url().isEmpty() || m_tab->url().scheme() == QL1S("qupzilla")) {
hide();
} else {
m_hideTimer->start();
}
} else { } else {
show(); show();
} }

View File

@ -291,8 +291,9 @@ void WebTab::attach(BrowserWindow* window)
m_tabBar = m_window->tabWidget()->tabBar(); m_tabBar = m_window->tabWidget()->tabBar();
m_webView->setBrowserWindow(m_window); m_webView->setBrowserWindow(m_window);
m_tabBar->setTabButton(tabIndex(), m_tabBar->iconButtonPosition(), m_tabIcon);
m_tabBar->setTabText(tabIndex(), title()); m_tabBar->setTabText(tabIndex(), title());
m_tabBar->setTabButton(tabIndex(), m_tabBar->iconButtonPosition(), m_tabIcon);
m_tabIcon->updateIcon();
} }
void WebTab::setHistoryData(const QByteArray &data) void WebTab::setHistoryData(const QByteArray &data)