Skip to content

Commit

Permalink
Fixed wrong sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
SeriousAlexej committed Mar 8, 2018
1 parent 40139ea commit 539ad87
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/TabToolbar/TabToolbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,20 @@ void TabToolbar::HideAt(int index)
{
if(isMinimized)
{
tabBar->setMaximumHeight(tabBar->tabBar()->height() + 2);
const int minHeight = tabBar->tabBar()->height() + 2;
tabBar->setMaximumHeight(minHeight);
tabBar->setMinimumHeight(minHeight);
setMaximumHeight(minHeight);
setMinimumHeight(minHeight);
isShown = false;
} else {
tabBar->setCurrentIndex(index);
if(!isShown)
{
tabBar->setMaximumHeight(maxHeight);
tabBar->setMinimumHeight(maxHeight);
setMaximumHeight(maxHeight);
setMinimumHeight(maxHeight);
tabBar->adjustSize();
}
setFocus();
Expand Down Expand Up @@ -250,6 +257,7 @@ void TabToolbar::AdjustVerticalSize(unsigned vSize)
{
maxHeight = vSize + tabBar->tabBar()->height() + 6;
setMaximumHeight(maxHeight);
setMinimumHeight(maxHeight);
});
}

Expand Down

0 comments on commit 539ad87

Please sign in to comment.