mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
83f0920721
commit
fef4a87c7c
@ -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();
|
||||
|
||||
|
@ -94,18 +94,12 @@ private:
|
||||
|
||||
void sendNewsFeedChanged();
|
||||
|
||||
QVBoxLayout *mLayout;
|
||||
QSet<QObject*> widgets;
|
||||
|
||||
/* lists of feedItems */
|
||||
std::list<ForumNewItem *> mForumNewItems;
|
||||
|
||||
std::list<ChanMsgItem *> mChanMsgItems;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user