[libcalamaresui] Improve layout of "blank" view step
This commit is contained in:
parent
9918dfb95f
commit
bb5ac0326d
@ -32,6 +32,9 @@ BlankViewStep::BlankViewStep( const QString& title, const QString& description,
|
||||
{
|
||||
QBoxLayout* layout = new QVBoxLayout();
|
||||
|
||||
constexpr int const marginWidth = 10;
|
||||
constexpr int const spacingHeight = 10;
|
||||
|
||||
auto* label = new QLabel( title );
|
||||
label->setAlignment( Qt::AlignHCenter );
|
||||
label->setFont( CalamaresUtils::largeFont() );
|
||||
@ -39,17 +42,19 @@ BlankViewStep::BlankViewStep( const QString& title, const QString& description,
|
||||
|
||||
label = new QLabel( description );
|
||||
label->setWordWrap( true );
|
||||
layout->addSpacing( 10 );
|
||||
label->setMargin( marginWidth );
|
||||
layout->addSpacing( spacingHeight );
|
||||
layout->addWidget( label );
|
||||
|
||||
if ( !details.isEmpty() )
|
||||
{
|
||||
label = new QLabel( details );
|
||||
layout->addSpacing( 10 );
|
||||
label->setMargin( marginWidth );
|
||||
layout->addSpacing( spacingHeight );
|
||||
layout->addWidget( label );
|
||||
}
|
||||
|
||||
layout->addStretch( 10 );
|
||||
layout->addStretch( 1 ); // Push the rest to the top
|
||||
|
||||
m_widget->setLayout( layout );
|
||||
}
|
||||
|
@ -31,7 +31,8 @@ namespace Calamares
|
||||
|
||||
/** @brief A "blank" view step, used for error and status reporting
|
||||
*
|
||||
*
|
||||
* This view step never allows navigation (forward or back); it's a trap.
|
||||
* It displays a title and explanation, and optional details.
|
||||
*/
|
||||
class BlankViewStep : public Calamares::ViewStep
|
||||
{
|
||||
@ -55,12 +56,6 @@ public:
|
||||
bool isAtEnd() const override;
|
||||
|
||||
Calamares::JobList jobs() const override;
|
||||
#if 0
|
||||
void onActivate() override;
|
||||
|
||||
|
||||
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
||||
#endif
|
||||
|
||||
private:
|
||||
QWidget* m_widget;
|
||||
|
Loading…
Reference in New Issue
Block a user