[libcalamaresui] Special margins for QML view steps

If there are no surrounding panels, drop the margin around the QML on
the assumption it needs to be full screen under special circumstances.
This commit is contained in:
Adriaan de Groot 2020-06-24 23:41:20 +02:00
parent d952faf909
commit 68aecf6a26
2 changed files with 17 additions and 0 deletions

View File

@ -151,6 +151,22 @@ QmlViewStep::widget()
return m_widget;
}
QSize
QmlViewStep::widgetMargins( Qt::Orientations panelSides )
{
// If any panels around it, use the standard, but if all the
// panels are hidden, like on full-screen with subsumed navigation,
// then no margins.
if ( panelSides )
{
return ViewStep::widgetMargins( panelSides );
}
else
{
return QSize( 0, 0 );
}
}
void
QmlViewStep::loadComplete()
{

View File

@ -55,6 +55,7 @@ public:
virtual QString prettyName() const override;
virtual QWidget* widget() override;
virtual QSize widgetMargins( Qt::Orientations panelSides ) override;
virtual bool isNextEnabled() const override;
virtual bool isBackEnabled() const override;