mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-16 17:13:58 -05:00
improved layout of board post item
This commit is contained in:
parent
68ee14e8c0
commit
a94c85751e
2 changed files with 49 additions and 210 deletions
|
|
@ -130,14 +130,14 @@ void BoardsPostItem::setup()
|
||||||
|
|
||||||
ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default-video.png"));
|
ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default-video.png"));
|
||||||
//ui->warn_image_label->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/status_unknown.png"));
|
//ui->warn_image_label->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/status_unknown.png"));
|
||||||
ui->readButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png"));
|
//ui->readButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png"));
|
||||||
ui->voteUpButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_up.png"));
|
//ui->voteUpButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_up.png"));
|
||||||
ui->voteDownButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_down.png"));
|
//ui->voteDownButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_down.png"));
|
||||||
ui->downloadButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/download.png"));
|
//ui->downloadButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/download.png"));
|
||||||
ui->playButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/play.png"));
|
//ui->playButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/play.png"));
|
||||||
ui->commentButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png"));
|
ui->commentButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png"));
|
||||||
//ui->editButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/pencil-edit-button.png"));
|
//ui->editButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/pencil-edit-button.png"));
|
||||||
ui->copyLinkButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/copy.png"));
|
//ui->copyLinkButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/copy.png"));
|
||||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/down-arrow.png"));
|
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/down-arrow.png"));
|
||||||
ui->readAndClearButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/correct.png"));
|
ui->readAndClearButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/correct.png"));
|
||||||
ui->clearButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/exit2.png"));
|
ui->clearButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/exit2.png"));
|
||||||
|
|
@ -149,9 +149,9 @@ void BoardsPostItem::setup()
|
||||||
/* clear ui */
|
/* clear ui */
|
||||||
ui->titleLabel->setText(tr("Loading..."));
|
ui->titleLabel->setText(tr("Loading..."));
|
||||||
ui->datetimelabel->clear();
|
ui->datetimelabel->clear();
|
||||||
ui->filelabel->hide();
|
//ui->filelabel->hide();
|
||||||
ui->newCommentLabel->hide();
|
//ui->newCommentLabel->hide();
|
||||||
ui->commLabel->hide();
|
//ui->commLabel->hide();
|
||||||
|
|
||||||
/* general ones */
|
/* general ones */
|
||||||
connect(ui->expandButton, SIGNAL(clicked()), this, SLOT(toggle()));
|
connect(ui->expandButton, SIGNAL(clicked()), this, SLOT(toggle()));
|
||||||
|
|
@ -160,30 +160,30 @@ void BoardsPostItem::setup()
|
||||||
|
|
||||||
/* specific */
|
/* specific */
|
||||||
connect(ui->readAndClearButton, SIGNAL(clicked()), this, SLOT(readAndClearItem()));
|
connect(ui->readAndClearButton, SIGNAL(clicked()), this, SLOT(readAndClearItem()));
|
||||||
connect(ui->unsubscribeButton, SIGNAL(clicked()), this, SLOT(unsubscribeChannel()));
|
//connect(ui->unsubscribeButton, SIGNAL(clicked()), this, SLOT(unsubscribeChannel()));
|
||||||
|
|
||||||
connect(ui->downloadButton, SIGNAL(clicked()), this, SLOT(download()));
|
//connect(ui->downloadButton, SIGNAL(clicked()), this, SLOT(download()));
|
||||||
// HACK FOR NOW.
|
// HACK FOR NOW.
|
||||||
ui->commentButton->hide();// hidden until properly enabled.
|
ui->commentButton->hide();// hidden until properly enabled.
|
||||||
// connect(ui->commentButton, SIGNAL(clicked()), this, SLOT(loadComments()));
|
// connect(ui->commentButton, SIGNAL(clicked()), this, SLOT(loadComments()));
|
||||||
|
|
||||||
connect(ui->playButton, SIGNAL(clicked()), this, SLOT(play(void)));
|
//connect(ui->playButton, SIGNAL(clicked()), this, SLOT(play(void)));
|
||||||
//connect(ui->editButton, SIGNAL(clicked()), this, SLOT(edit(void)));
|
//connect(ui->editButton, SIGNAL(clicked()), this, SLOT(edit(void)));
|
||||||
connect(ui->copyLinkButton, SIGNAL(clicked()), this, SLOT(copyMessageLink()));
|
//connect(ui->copyLinkButton, SIGNAL(clicked()), this, SLOT(copyMessageLink()));
|
||||||
|
|
||||||
connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool)));
|
//connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool)));
|
||||||
|
|
||||||
// hide voting buttons, backend is not implemented yet
|
// hide voting buttons, backend is not implemented yet
|
||||||
ui->voteUpButton->hide();
|
//ui->voteUpButton->hide();
|
||||||
ui->voteDownButton->hide();
|
//ui->voteDownButton->hide();
|
||||||
|
|
||||||
ui->scoreLabel->hide();
|
//ui->scoreLabel->hide();
|
||||||
|
|
||||||
// hide unsubscribe button not necessary
|
// hide unsubscribe button not necessary
|
||||||
ui->unsubscribeButton->hide();
|
//ui->unsubscribeButton->hide();
|
||||||
|
|
||||||
ui->downloadButton->hide();
|
//ui->downloadButton->hide();
|
||||||
ui->playButton->hide();
|
//ui->playButton->hide();
|
||||||
//ui->warn_image_label->hide();
|
//ui->warn_image_label->hide();
|
||||||
//ui->warning_label->hide();
|
//ui->warning_label->hide();
|
||||||
|
|
||||||
|
|
@ -328,7 +328,7 @@ void BoardsPostItem::fill()
|
||||||
ui->logoLabel->setPicture( FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default-video.png") );
|
ui->logoLabel->setPicture( FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default-video.png") );
|
||||||
|
|
||||||
//if( !IS_GROUP_PUBLISHER(mGroupMeta.mSubscribeFlags) )
|
//if( !IS_GROUP_PUBLISHER(mGroupMeta.mSubscribeFlags) )
|
||||||
ui->editButton->hide() ; // never show this button. Feeds are not the place to edit posts.
|
//ui->editButton->hide() ; // never show this button. Feeds are not the place to edit posts.
|
||||||
|
|
||||||
if(mPost.mNotes.empty())
|
if(mPost.mNotes.empty())
|
||||||
ui->expandButton->hide() ; // never show this button.
|
ui->expandButton->hide() ; // never show this button.
|
||||||
|
|
@ -357,17 +357,17 @@ void BoardsPostItem::fill()
|
||||||
//ui->newCommentLabel->setText(RsStringUtil::CopyLines(QString::fromUtf8(mPost.mNotes.c_str()), 1)) ;
|
//ui->newCommentLabel->setText(RsStringUtil::CopyLines(QString::fromUtf8(mPost.mNotes.c_str()), 1)) ;
|
||||||
//ui->newCommentLabel->setText(RsHtml().formatText(NULL, QString::fromUtf8(mPost.mNotes.c_str()), /* RSHTML_FORMATTEXT_EMBED_SMILEYS |*/ RSHTML_FORMATTEXT_EMBED_LINKS));
|
//ui->newCommentLabel->setText(RsHtml().formatText(NULL, QString::fromUtf8(mPost.mNotes.c_str()), /* RSHTML_FORMATTEXT_EMBED_SMILEYS |*/ RSHTML_FORMATTEXT_EMBED_LINKS));
|
||||||
|
|
||||||
if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags))
|
// if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags))
|
||||||
{
|
// {
|
||||||
ui->unsubscribeButton->setEnabled(true);
|
// ui->unsubscribeButton->setEnabled(true);
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
ui->unsubscribeButton->setEnabled(false);
|
// ui->unsubscribeButton->setEnabled(false);
|
||||||
}
|
// }
|
||||||
ui->readButton->hide();
|
//ui->readButton->hide();
|
||||||
ui->newLabel->hide();
|
ui->newLabel->hide();
|
||||||
ui->copyLinkButton->hide();
|
//ui->copyLinkButton->hide();
|
||||||
|
|
||||||
if (IS_MSG_NEW(mPost.mMeta.mMsgStatus))
|
if (IS_MSG_NEW(mPost.mMeta.mMsgStatus))
|
||||||
mCloseOnRead = true;
|
mCloseOnRead = true;
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1092</width>
|
<width>803</width>
|
||||||
<height>255</height>
|
<height>175</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="BoardsPostItem_GL">
|
<layout class="QGridLayout" name="BoardsPostItem_GL">
|
||||||
|
|
@ -138,190 +138,26 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="subjectLabel">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>11</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="newCommHLayout">
|
<layout class="QHBoxLayout" name="newCommHLayout">
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="newCommentLabel">
|
<widget class="QLabel" name="subjectLabel">
|
||||||
<property name="text">
|
|
||||||
<string>New Comment:</string>
|
|
||||||
</property>
|
|
||||||
<property name="scaledContents">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="ElidedLabel" name="commLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Comment Value</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="buttonHLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="readButton">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Toggle Message Read Status</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="scoreLabel">
|
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
|
<pointsize>11</pointsize>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
|
<italic>false</italic>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>0</string>
|
<string notr="true">TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="openExternalLinks">
|
||||||
</item>
|
<bool>true</bool>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="voteUpButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>I like this</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="voteDownButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>I dislike this</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="downloadButton">
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Download</string>
|
|
||||||
</property>
|
|
||||||
<property name="autoExclusive">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="playButton">
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Play</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="commentButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Comments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="editButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Edit</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="copyLinkButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Copy RetroShare Link</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="filelabel">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">fileLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="unsubscribeButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Unsubscribe From Channel</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Unsubscribe</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -338,6 +174,13 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="commentButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Comments</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="expandButton">
|
<widget class="QPushButton" name="expandButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
|
@ -478,18 +321,14 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
|
||||||
<class>ElidedLabel</class>
|
|
||||||
<extends>QLabel</extends>
|
|
||||||
<header>gui/common/ElidedLabel.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>ZoomableLabel</class>
|
<class>ZoomableLabel</class>
|
||||||
<extends>QLabel</extends>
|
<extends>QLabel</extends>
|
||||||
<header>gui/gxschannels/GxsChannelPostThumbnail.h</header>
|
<header>gui/gxschannels/GxsChannelPostThumbnail.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../icons.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue