Commit 3023294c authored by Kurt Hindenburg's avatar Kurt Hindenburg

Fix rows calculation for new profile settings.

New feature in 2.13 allows columns/rows in profiles; however, the
rows would be incorrect depending on if tabbar was visible.  Ideally,
this should not be needed but I would guess this won't get fixed
correctly until frameworks timeframe.
This calculation can still be wrong if ShowNavigationAsNeeded and
perhaps other times depending on height of tabbar.

FIXED: 2.13
(cherry picked from commit 73e1db3e)
parent 2f77058a
......@@ -559,8 +559,14 @@ void ViewManager::createView(Session* session, ViewContainer* container, int ind
// However, it appears that taking into account the tabbar is needed.
// If tabbar is not visible, no +1 is needed here; however, depending on
// settings/tabbar style, +2 might be needed.
display->setSize(preferredSize.width(), preferredSize.height() + 1);
// 1st attempt at fixing the above:
// Guess if tabbar will NOT be visible; ignore ShowNavigationAsNeeded
int heightAdjustment = 0;
if (_navigationVisibility != ViewContainer::AlwaysHideNavigation) {
heightAdjustment = 2;
}
display->setSize(preferredSize.width(), preferredSize.height() + heightAdjustment);
ViewProperties* properties = createController(session, display);
_sessionMap[display] = session;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment