|
|
|
@ -89,6 +89,7 @@ const QStringList Branding::s_styleEntryStrings =
|
|
|
|
|
// clang-format on
|
|
|
|
|
// *INDENT-ON*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const NamedEnumTable< Branding::WindowDimensionUnit >&
|
|
|
|
|
Branding::WindowDimension::suffixes()
|
|
|
|
|
{
|
|
|
|
@ -407,14 +408,24 @@ getString( const YAML::Node& doc, const char* key )
|
|
|
|
|
void
|
|
|
|
|
Branding::initSimpleSettings( const YAML::Node& doc )
|
|
|
|
|
{
|
|
|
|
|
// *INDENT-OFF*
|
|
|
|
|
// clang-format off
|
|
|
|
|
static const NamedEnumTable< WindowExpansion > expansionNames {
|
|
|
|
|
{ QStringLiteral( "normal" ), WindowExpansion::Normal },
|
|
|
|
|
{ QStringLiteral( "fullscreen" ), WindowExpansion::Fullscreen },
|
|
|
|
|
{ QStringLiteral( "noexpand" ), WindowExpansion::Fixed }
|
|
|
|
|
};
|
|
|
|
|
static const NamedEnumTable< WindowPlacement > placementNames {
|
|
|
|
|
{ QStringLiteral( "free" ), WindowPlacement::Free }, { QStringLiteral( "center" ), WindowPlacement::Center }
|
|
|
|
|
{ QStringLiteral( "free" ), WindowPlacement::Free },
|
|
|
|
|
{ QStringLiteral( "center" ), WindowPlacement::Center }
|
|
|
|
|
};
|
|
|
|
|
static const NamedEnumTable< SidebarFlavor > sidebarFlavorNames {
|
|
|
|
|
{ QStringLiteral( "widget" ), SidebarFlavor::Widget },
|
|
|
|
|
{ QStringLiteral( "none" ), SidebarFlavor::None },
|
|
|
|
|
{ QStringLiteral( "qml" ), SidebarFlavor::Qml }
|
|
|
|
|
};
|
|
|
|
|
// clang-format on
|
|
|
|
|
// *INDENT-ON*
|
|
|
|
|
bool ok = false;
|
|
|
|
|
|
|
|
|
|
m_welcomeStyleCalamares = doc[ "welcomeStyleCalamares" ].as< bool >( false );
|
|
|
|
@ -431,6 +442,12 @@ Branding::initSimpleSettings( const YAML::Node& doc )
|
|
|
|
|
cWarning() << "Branding module-setting *windowPlacement* interpreted as"
|
|
|
|
|
<< placementNames.find( m_windowPlacement, ok );
|
|
|
|
|
}
|
|
|
|
|
m_sidebarFlavor = sidebarFlavorNames.find( getString( doc, "sidebar" ), ok );
|
|
|
|
|
if ( !ok )
|
|
|
|
|
{
|
|
|
|
|
cWarning() << "Branding module-setting *sidebar* interpreted as"
|
|
|
|
|
<< sidebarFlavorNames.find( m_sidebarFlavor, ok );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString windowSize = getString( doc, "windowSize" );
|
|
|
|
|
if ( !windowSize.isEmpty() )
|
|
|
|
|