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

Merge branch 'Falkon/3.0'

This commit is contained in:
David Rosca 2018-03-25 09:13:44 +02:00
commit 162f09901d
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 3 additions and 10 deletions

View File

@ -147,8 +147,8 @@ void TabIcon::hide()
return;
}
emit resized();
setFixedSize(1, qMax(minimumHeight(), 16));
emit resized();
QWidget::hide();
}
@ -169,13 +169,6 @@ bool TabIcon::event(QEvent *event)
event->accept();
return true;
}
} else if (event->type() == QEvent::Resize) {
// Force resize to correct size
if (isVisible()) {
QTimer::singleShot(0, this, &TabIcon::show);
} else {
QTimer::singleShot(0, this, &TabIcon::hide);
}
}
return QWidget::event(event);

View File

@ -196,7 +196,7 @@ WebTab::WebTab(QWidget *parent)
// Workaround QTabBar not immediately noticing resizing of tab buttons
connect(m_tabIcon, &TabIcon::resized, this, [this]() {
if (m_tabBar) {
m_tabBar->setTabButton(tabIndex(), m_tabBar->iconButtonPosition(), m_tabIcon);
m_tabBar->update();
}
});
}
@ -349,7 +349,7 @@ void WebTab::attach(BrowserWindow* window)
m_locationBar->setBrowserWindow(m_window);
m_tabBar->setTabText(tabIndex(), title());
m_tabBar->setTabButton(tabIndex(), m_tabBar->iconButtonPosition(), m_tabIcon);
m_tabIcon->updateIcon();
QTimer::singleShot(0, m_tabIcon, &TabIcon::updateIcon);
auto currentChanged = [this](int index) {
const bool wasCurrent = m_isCurrentTab;