1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

TabBar: Don't calculate tabSizeHint only when window is invisible

Fixes issue with tabbar sometimes having 1px height when leaving fullscreen.

Closes #1967
This commit is contained in:
David Rosca 2016-07-10 16:34:05 +02:00
parent a79395b0fb
commit 4cb62b73fb

View File

@ -1,6 +1,6 @@
/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -139,8 +139,8 @@ void TabBar::closeAllButCurrent()
QSize TabBar::tabSizeHint(int index, bool fast) const
{
if (!isVisible()) {
// Don't calculate it when tabbar is not visible
if (!m_window->isVisible()) {
// Don't calculate it when window is not visible
// It produces invalid size anyway
return QSize(-1, -1);
}