@ -237,11 +237,13 @@ CalamaresWindow::getQmlNavigation( QWidget* parent )
}
# else
// Bogus to keep the linker happy
QWidget * CalamaresWindow : : getQmlSidebar ( QWidget * , int )
QWidget *
CalamaresWindow : : getQmlSidebar ( QWidget * , int )
{
return nullptr ;
}
QWidget * CalamaresWindow : : getQmlNavigation ( QWidget * )
QWidget *
CalamaresWindow : : getQmlNavigation ( QWidget * )
{
return nullptr ;
}
@ -401,6 +403,14 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
insertIf ( mainLayout , PanelSide : : Right , navigation , branding - > navigationSide ( ) ) ;
insertIf ( mainLayout , PanelSide : : Right , sideBox , branding - > sidebarSide ( ) ) ;
// layout->count() returns number of things in it; above we have put
// at **least** the central widget, which comes from the view manager,
// both vertically and horizontally -- so if there's a panel along
// either axis, the count in that axis will be > 1.
m_viewManager - > setPanelSides (
( contentsLayout - > count ( ) > 1 ? Qt : : Orientations ( Qt : : Horizontal ) : Qt : : Orientations ( ) )
| ( mainLayout - > count ( ) > 1 ? Qt : : Orientations ( Qt : : Vertical ) : Qt : : Orientations ( ) ) ) ;
CalamaresUtils : : unmarginLayout ( mainLayout ) ;
CalamaresUtils : : unmarginLayout ( contentsLayout ) ;
baseWidget - > setLayout ( mainLayout ) ;