From e9965d37e3a98f2c91964926d87f4d20ebb143b5 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 10 Mar 2020 18:05:24 -0500 Subject: [PATCH] [calamares] Don't create sidebar if we don't want it --- src/calamares/CalamaresWindow.cpp | 8 ++++++-- src/libcalamaresui/Branding.h | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index f3accdd42..d1c6f3bba 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -172,8 +172,12 @@ CalamaresWindow::CalamaresWindow( QWidget* parent ) QBoxLayout* mainLayout = new QHBoxLayout; setLayout( mainLayout ); - QWidget* sideBox = getWidgetSidebar( - qBound( 100, CalamaresUtils::defaultFontHeight() * 12, w < windowPreferredWidth ? 100 : 190 ) ); + 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 ); diff --git a/src/libcalamaresui/Branding.h b/src/libcalamaresui/Branding.h index 6bc85875c..88f658473 100644 --- a/src/libcalamaresui/Branding.h +++ b/src/libcalamaresui/Branding.h @@ -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