Simplify layout of NewsFeed dialog.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6531 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-07-22 19:14:49 +00:00
parent 83f0920721
commit fef4a87c7c
3 changed files with 10 additions and 14 deletions

View File

@ -20,7 +20,6 @@
****************************************************************/
#include <QTimer>
#include <QSpacerItem>
#include "NewsFeed.h"
@ -101,11 +100,6 @@ NewsFeed::NewsFeed(QWidget *parent)
") ;
registerHelpButton(helpButton,hlp_str) ;
QFrame * frame = new QFrame ;
scrollArea->setWidget(frame) ;
mLayout = new QVBoxLayout(scrollArea->widget()) ;
mLayout->addItem(new QSpacerItem(10,0,QSizePolicy::Minimum, QSizePolicy::MinimumExpanding)) ;
}
NewsFeed::~NewsFeed()
@ -464,9 +458,9 @@ void NewsFeed::addFeedItem(QWidget *item)
lockLayout(NULL, true);
if (Settings->getAddFeedsAtEnd()) {
mLayout->addWidget(item);
itemsLayout->addWidget(item);
} else {
mLayout->insertWidget(0, item);
itemsLayout->insertWidget(0, item);
}
item->show();

View File

@ -94,18 +94,12 @@ private:
void sendNewsFeedChanged();
QVBoxLayout *mLayout;
QSet<QObject*> widgets;
/* lists of feedItems */
std::list<ForumNewItem *> mForumNewItems;
std::list<ChanMsgItem *> mChanMsgItems;
};
#endif

View File

@ -142,6 +142,14 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="itemsLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="margin">
<number>3</number>
</property>
</layout>
</widget>
</widget>
</item>