Commit ed27cffc authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

Revert "Welcome mode: Base on QScrollArea."

No need for scrolling after my last commit.

This reverts commit 577057d2.
parent bac08e93
......@@ -35,6 +35,7 @@
#include <QtGui/QVBoxLayout>
#include <QtGui/QMouseEvent>
#include <QtGui/QResizeEvent>
#include <QtGui/QImage>
enum { leftContentsMargin = 2,
topContentsMargin = 2,
......@@ -240,24 +241,14 @@ WelcomeModeTreeWidgetPrivate::WelcomeModeTreeWidgetPrivate() :
itemLayout(new QVBoxLayout)
{
layout->setMargin(0);
itemLayout->setMargin(0);
}
WelcomeModeTreeWidget::WelcomeModeTreeWidget(QWidget *parent) :
QScrollArea(parent), m_d(new WelcomeModeTreeWidgetPrivate)
QWidget(parent), m_d(new WelcomeModeTreeWidgetPrivate)
{
setLayout(m_d->layout);
m_d->layout->addLayout(m_d->itemLayout);
m_d->layout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
QWidget *contents = new QWidget;
contents->setLayout(m_d->layout);
viewport()->setBackgroundRole(QPalette::Base); // Bright background.
setWidget(contents);
setWidgetResizable(true);
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setFrameStyle(QFrame::NoFrame);
setFrameShadow(QFrame::Plain);
setContentsMargins(0, 0, 0, 0);
}
WelcomeModeTreeWidget::~WelcomeModeTreeWidget()
......
......@@ -32,7 +32,7 @@
#include "utils_global.h"
#include <QtGui/QScrollArea>
#include <QtGui/QTreeWidget>
#include <QtGui/QLabel>
namespace Utils {
......@@ -53,7 +53,7 @@ private:
};
// WelcomeModeTreeWidget: Show an itemized list with arrows and emits a signal on click.
class QTCREATOR_UTILS_EXPORT WelcomeModeTreeWidget : public QScrollArea
class QTCREATOR_UTILS_EXPORT WelcomeModeTreeWidget : public QWidget
{
Q_OBJECT
public:
......
......@@ -159,7 +159,7 @@
<customwidgets>
<customwidget>
<class>Utils::WelcomeModeTreeWidget</class>
<extends>QScrollArea</extends>
<extends>QWidget</extends>
<header location="global">utils/welcomemodetreewidget.h</header>
<container>1</container>
</customwidget>
......
......@@ -340,7 +340,7 @@
<customwidgets>
<customwidget>
<class>Utils::WelcomeModeTreeWidget</class>
<extends>QScrollArea</extends>
<extends>QWidget</extends>
<header location="global">utils/welcomemodetreewidget.h</header>
</customwidget>
<customwidget>
......
......@@ -105,7 +105,7 @@
<customwidgets>
<customwidget>
<class>Utils::WelcomeModeTreeWidget</class>
<extends>QScrollArea</extends>
<extends>QWidget</extends>
<header location="global">utils/welcomemodetreewidget.h</header>
</customwidget>
<customwidget>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment