diff --git a/src/modules/summary/SummaryPage.cpp b/src/modules/summary/SummaryPage.cpp index eb7bd2355..8a4e3b5b4 100644 --- a/src/modules/summary/SummaryPage.cpp +++ b/src/modules/summary/SummaryPage.cpp @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,11 +25,14 @@ #include #include +#include static const int SECTION_SPACING = 12; SummaryPage::SummaryPage( QWidget* parent ) : QWidget() + , m_scrollArea( new QScrollArea( this ) ) + , m_contentWidget( nullptr ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setContentsMargins( 0, 0, 0, 0 ); @@ -40,6 +43,12 @@ SummaryPage::SummaryPage( QWidget* parent ) "the install procedure." ) ); ) layout->addWidget( headerLabel ); + layout->addWidget( m_scrollArea ); + m_scrollArea->setWidgetResizable( true ); + m_scrollArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); + m_scrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded ); + m_scrollArea->setFrameStyle( QFrame::NoFrame ); + m_scrollArea->setContentsMargins( 0, 0, 0, 0 ); } @@ -88,7 +97,7 @@ SummaryPage::createContentWidget() m_contentWidget = new QWidget; m_layout = new QVBoxLayout( m_contentWidget ); CalamaresUtils::unmarginLayout( m_layout ); - layout()->addWidget( m_contentWidget ); + m_scrollArea->setWidget( m_contentWidget ); } QLabel* diff --git a/src/modules/summary/SummaryPage.h b/src/modules/summary/SummaryPage.h index 6e4fa395f..837c694ce 100644 --- a/src/modules/summary/SummaryPage.h +++ b/src/modules/summary/SummaryPage.h @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ #include class QLabel; +class QScrollArea; class QVBoxLayout; class SummaryPage : public QWidget @@ -39,6 +40,8 @@ private: void createContentWidget(); QLabel* createTitleLabel( const QString& text ) const; QLabel* createBodyLabel( const QString& text ) const; + + QScrollArea* m_scrollArea; }; #endif // SUMMARYPAGE_H