1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +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; return;
} }
emit resized();
setFixedSize(1, qMax(minimumHeight(), 16)); setFixedSize(1, qMax(minimumHeight(), 16));
emit resized();
QWidget::hide(); QWidget::hide();
} }
@ -169,13 +169,6 @@ bool TabIcon::event(QEvent *event)
event->accept(); event->accept();
return true; 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); return QWidget::event(event);

View File

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