[calamares] Warnings--

- Set the width of the QML sidebar explicitly
- Handle all sidebar-flavor enum values explicitly
main
Adriaan de Groot 5 years ago
parent 948ecb4fd1
commit 3f87cc214a

@ -136,6 +136,8 @@ CalamaresWindow::getQmlSidebar( int desiredWidth )
{ {
CalamaresUtils::registerCalamaresModels(); CalamaresUtils::registerCalamaresModels();
QQuickWidget* w = new QQuickWidget( this ); QQuickWidget* w = new QQuickWidget( this );
w->setFixedWidth( desiredWidth );
w->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
w->setSource( QUrl( w->setSource( QUrl(
CalamaresUtils::searchQmlFile( CalamaresUtils::QmlSearch::Both, QStringLiteral( "calamares-sidebar" ) ) ) ); CalamaresUtils::searchQmlFile( CalamaresUtils::QmlSearch::Both, QStringLiteral( "calamares-sidebar" ) ) ) );
return w; return w;
@ -197,7 +199,7 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
sideBox = getQmlSidebar( sideBox = getQmlSidebar(
qBound( 100, CalamaresUtils::defaultFontHeight() * 12, w < windowPreferredWidth ? 100 : 190 ) ); qBound( 100, CalamaresUtils::defaultFontHeight() * 12, w < windowPreferredWidth ? 100 : 190 ) );
break; break;
default: case Calamares::Branding::SidebarFlavor::None:
sideBox = nullptr; sideBox = nullptr;
} }
if ( sideBox ) if ( sideBox )

Loading…
Cancel
Save