[calamares] Don't create sidebar if we don't want it
This commit is contained in:
parent
80f49bed1d
commit
e9965d37e3
@ -172,8 +172,12 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
|
||||
QBoxLayout* mainLayout = new QHBoxLayout;
|
||||
setLayout( mainLayout );
|
||||
|
||||
QWidget* sideBox = getWidgetSidebar(
|
||||
QWidget* sideBox = nullptr;
|
||||
if ( branding->sidebarFlavor() == Calamares::Branding::SidebarFlavor::Widget )
|
||||
{
|
||||
sideBox = getWidgetSidebar(
|
||||
qBound( 100, CalamaresUtils::defaultFontHeight() * 12, w < windowPreferredWidth ? 100 : 190 ) );
|
||||
}
|
||||
if ( sideBox )
|
||||
{
|
||||
mainLayout->addWidget( sideBox );
|
||||
|
@ -184,6 +184,9 @@ public:
|
||||
}
|
||||
bool windowPlacementCentered() const { return m_windowPlacement == WindowPlacement::Center; }
|
||||
|
||||
///@brief Which sidebar flavor is configured
|
||||
SidebarFlavor sidebarFlavor() const { return m_sidebarFlavor; }
|
||||
|
||||
/**
|
||||
* Creates a map called "branding" in the global storage, and inserts an
|
||||
* entry for each of the branding strings. This makes the branding
|
||||
|
Loading…
Reference in New Issue
Block a user