diff --git a/retroshare-gui/src/gui/feeds/BoardsCommentsItem.cpp b/retroshare-gui/src/gui/feeds/BoardsCommentsItem.cpp index 0d879b458..ebc34ac31 100644 --- a/retroshare-gui/src/gui/feeds/BoardsCommentsItem.cpp +++ b/retroshare-gui/src/gui/feeds/BoardsCommentsItem.cpp @@ -365,12 +365,9 @@ void BoardsCommentsItem::setup() mInFill = false; /* clear ui */ - //ui->titleLabel->setText(tr("Loading")); ui->datetimeLabel->clear(); ui->replyFrame->hide(); - ui->commentButton->hide(); - ui->commentButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png")); ui->copyLinkButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/copy.png")); ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/down-arrow.png")); ui->readAndClearButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/correct.png")); @@ -380,7 +377,6 @@ void BoardsCommentsItem::setup() connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(removeItem())); /* specific */ - connect(ui->commentButton, SIGNAL( clicked()), this, SLOT(loadComments())); connect(ui->voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote())); connect(ui->voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote())); connect(ui->expandButton, SIGNAL(clicked()), this, SLOT( toggle())); @@ -395,7 +391,6 @@ void BoardsCommentsItem::setup() // hide expand button, replies is not implemented yet ui->expandButton->hide(); - ui->unsubscribeButton->hide(); ui->clearButton->hide(); ui->readAndClearButton->hide(); @@ -449,13 +444,14 @@ void BoardsCommentsItem::setCommentsSize(int comNb) else if(comNb > 1) sComButText = tr("Comments ").append("(%1)").arg(comNb); - ui->commentButton->setText(sComButText); + //ui->commentButton->setText(sComButText); } void BoardsCommentsItem::fill() { - ui->logoLabel->setPixmap( FilesDefs::getPixmapFromQtResourcePath(":/icons/png/comment.png")); + ui->logoLabel->hide(); + //ui->logoLabel->setPixmap( FilesDefs::getPixmapFromQtResourcePath(":/icons/png/comment.png")); //RetroShareLink link = RetroShareLink::createGxsGroupLink(RetroShareLink::TYPE_POSTED, mGroupMeta.mGroupId, groupName()); //ui->titleLabel->setText(link.toHtml()); @@ -475,7 +471,7 @@ void BoardsCommentsItem::fill() //frame_comment->show(); //ui->commentButton->show(); - if (mPost.mComments) + /*if (mPost.mComments) { QString commentText = QString::number(mPost.mComments); commentText += " "; @@ -485,7 +481,7 @@ void BoardsCommentsItem::fill() else { ui->commentButton->setText(tr("Comment")); - } + }*/ //setReadStatus(IS_MSG_NEW(mPost.mMeta.mMsgStatus), IS_MSG_UNREAD(mPost.mMeta.mMsgStatus) || IS_MSG_NEW(mPost.mMeta.mMsgStatus)); } @@ -493,7 +489,6 @@ void BoardsCommentsItem::fill() { // no feed. //frame_comment->hide(); - ui->commentButton->hide(); ui->readButton->hide(); } @@ -507,7 +502,6 @@ void BoardsCommentsItem::fill() { ui->clearButton->show(); ui->readAndClearButton->show(); - ui->titleLabel->hide(); } // hide read button not yet functional diff --git a/retroshare-gui/src/gui/feeds/BoardsCommentsItem.ui b/retroshare-gui/src/gui/feeds/BoardsCommentsItem.ui index c13e9685c..656c7ccbf 100644 --- a/retroshare-gui/src/gui/feeds/BoardsCommentsItem.ui +++ b/retroshare-gui/src/gui/feeds/BoardsCommentsItem.ui @@ -7,7 +7,7 @@ 0 0 755 - 201 + 175 @@ -23,7 +23,7 @@ 1 - + @@ -41,62 +41,46 @@ QFrame::Sunken - - + + 9 + + + + + 8 + - - - - 0 - 0 - - - - - 70 - 70 - - + - 70 - 70 + 24 + 16777215 - - + + Qt::NoFocus - + + Toggle Message Read Status + + true - - Qt::AlignCenter + + false + + + false - - - Qt::Vertical + + + Avatar - - - 20 - 40 - - - + - - - - - - 9 - - - 9 - @@ -135,272 +119,6 @@ - - - - - 0 - 0 - - - - - 75 - true - true - - - - Channel Subject - - - false - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 75 - true - - - - DateTime - - - - - - - - - - 0 - 0 - - - - - - - - QLayout::SetDefaultConstraint - - - 0 - - - 0 - - - 0 - - - 0 - - - 6 - - - 0 - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 288 - 17 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 0 - 0 - - - - - 75 - true - - - - Name - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - 32 - 32 - - - - - 32 - 32 - - - - Avatar - - - - - - - - 0 - 0 - - - - - MS Sans Serif - 10 - - - - Comm value - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - - 8 - - - - - - 24 - 16777215 - - - - Qt::NoFocus - - - Toggle Message Read Status - - - true - - - false - - - false - - - - - - - - 75 - true - - - - 0 - - - - - - - I like this - - - - - - - - - - I dislike this - - - - - - - - - - - MS Sans Serif - 10 - 75 - true - - - - Comments - - - @@ -414,25 +132,6 @@ - - - - - 0 - 0 - - - - Qt::NoFocus - - - Unsubscribe From Channel - - - Unsubscribe - - - @@ -569,6 +268,200 @@ + + + + + + + 0 + 0 + + + + + 70 + 70 + + + + + 70 + 70 + + + + + + + true + + + Qt::AlignCenter + + + + + + + + + I like this + + + + + + + + + + + 75 + true + + + + 0 + + + + + + + I dislike this + + + + + + + + + + + + Qt::Vertical + + + + 58 + 10 + + + + + + + + + + + 0 + 0 + + + + + + + + 3 + + + 3 + + + 9 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 288 + 17 + + + + + + + + + 75 + true + + + + DateTime + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Name + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + MS Sans Serif + 10 + + + + Comm value + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + diff --git a/retroshare-gui/src/gui/feeds/ChannelsCommentsItem.cpp b/retroshare-gui/src/gui/feeds/ChannelsCommentsItem.cpp index a47bb9454..34fa7c75a 100644 --- a/retroshare-gui/src/gui/feeds/ChannelsCommentsItem.cpp +++ b/retroshare-gui/src/gui/feeds/ChannelsCommentsItem.cpp @@ -133,11 +133,11 @@ void ChannelsCommentsItem::setup() // This is particularly important here because a channel may contain many posts, so duplicating the QImages here is deadly for the // memory. - ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/comment.png")); + ui->logoLabel->hide(); + //ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/comment.png")); ui->readButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png")); ui->voteUpButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_up.png")); ui->voteDownButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_down.png")); - ui->commentButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png")); ui->copyLinkButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/copy.png")); ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/down-arrow.png")); ui->readAndClearButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/correct.png")); @@ -150,8 +150,7 @@ void ChannelsCommentsItem::setup() mLoaded = false; /* clear ui */ - //ui->titleLabel->setText(tr("Loading...")); - ui->datetimelabel->clear(); + ui->datetimeLabel->clear(); /* general ones */ connect(ui->expandButton, SIGNAL(clicked()), this, SLOT(toggle())); @@ -159,13 +158,10 @@ void ChannelsCommentsItem::setup() /* specific */ connect(ui->readAndClearButton, SIGNAL(clicked()), this, SLOT(readAndClearItem())); - connect(ui->unsubscribeButton, SIGNAL(clicked()), this, SLOT(unsubscribeChannel())); // HACK FOR NOW. - 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->copyLinkButton, SIGNAL(clicked()), this, SLOT(copyMessageLink())); - connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool))); // hide voting buttons, backend is not implemented yet @@ -178,9 +174,6 @@ void ChannelsCommentsItem::setup() // hide expand button, replies is not implemented yet ui->expandButton->hide(); - ui->unsubscribeButton->hide(); - - //ui->titleLabel->setMinimumWidth(100); ui->mainFrame->setProperty("new", false); ui->mainFrame->style()->unpolish(ui->mainFrame); @@ -312,12 +305,12 @@ void ChannelsCommentsItem::loadMessage() RsQThreadUtils::postToObject( [cmt,this]() { - uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->titleLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height()); + uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height()); ui->commLabel->setText(RsHtml().formatText(NULL, RsStringUtil::CopyLines(QString::fromUtf8(cmt.mComment.c_str()), autorized_lines), RSHTML_FORMATTEXT_EMBED_LINKS)); ui->nameLabel->setId(cmt.mMeta.mAuthorId); - ui->datetimelabel->setText(DateTime::formatLongDateTime(cmt.mMeta.mPublishTs)); + ui->datetimeLabel->setText(DateTime::formatLongDateTime(cmt.mMeta.mPublishTs)); RsIdentityDetails idDetails ; rsIdentity->getIdDetails(cmt.mMeta.mAuthorId,idDetails); @@ -381,7 +374,7 @@ void ChannelsCommentsItem::loadComment() else if(comNb > 1) sComButText = tr("Comments ").append("(%1)").arg(comNb); - ui->commentButton->setText(sComButText); + //ui->commentButton->setText(sComButText); }, this ); }); @@ -403,7 +396,7 @@ void ChannelsCommentsItem::fill() mInFill = true; - QString title; + //QString title; //float f = QFontMetricsF(font()).height()/14.0 ; if (!mIsHome) @@ -421,14 +414,14 @@ void ChannelsCommentsItem::fill() if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags)) { - ui->unsubscribeButton->setEnabled(true); + //ui->unsubscribeButton->setEnabled(true); } else { - ui->unsubscribeButton->setEnabled(false); + //ui->unsubscribeButton->setEnabled(false); } ui->readButton->hide(); - ui->titleLabel->hide(); + //ui->titleLabel->hide(); if (IS_MSG_NEW(mPost.mMeta.mMsgStatus)) { mCloseOnRead = true; @@ -439,7 +432,7 @@ void ChannelsCommentsItem::fill() /* subject */ //ui->titleLabel->setText(QString::fromUtf8(mPost.mMeta.mMsgName.c_str())); - uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->titleLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height()); + uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height()); // fill first 4 lines of message. (csoler) Disabled the replacement of smileys and links, because the cost is too crazy //ui->subjectLabel->setText(RsHtml().formatText(NULL, RsStringUtil::CopyLines(QString::fromUtf8(mPost.mMsg.c_str()), autorized_lines), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS)); @@ -451,12 +444,10 @@ void ChannelsCommentsItem::fill() /* disable buttons: deletion facility not enabled with cache services yet */ ui->clearButton->setEnabled(false); - ui->unsubscribeButton->setEnabled(false); ui->clearButton->hide(); ui->readAndClearButton->hide(); - ui->unsubscribeButton->hide(); ui->copyLinkButton->show(); - ui->titleLabel->hide(); + //ui->titleLabel->hide(); if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags)) { @@ -493,7 +484,7 @@ void ChannelsCommentsItem::fill() } else { - ui->commentButton->hide(); + //ui->commentButton->hide(); } // disable voting buttons - if they have already voted. diff --git a/retroshare-gui/src/gui/feeds/ChannelsCommentsItem.ui b/retroshare-gui/src/gui/feeds/ChannelsCommentsItem.ui index 83759a9ea..5697aa0c2 100644 --- a/retroshare-gui/src/gui/feeds/ChannelsCommentsItem.ui +++ b/retroshare-gui/src/gui/feeds/ChannelsCommentsItem.ui @@ -7,7 +7,7 @@ 0 0 755 - 201 + 173 @@ -23,7 +23,7 @@ 1 - + @@ -41,62 +41,46 @@ QFrame::Sunken - - + + 9 + + + + + 8 + - - - - 0 - 0 - - - - - 70 - 70 - - + - 70 - 70 + 24 + 16777215 - - + + Qt::NoFocus - + + Toggle Message Read Status + + true - - Qt::AlignCenter + + false + + + false - - - Qt::Vertical + + + Avatar - - - 20 - 40 - - - + - - - - - - 9 - - - 9 - @@ -135,272 +119,6 @@ - - - - - 0 - 0 - - - - - 75 - true - true - - - - Channel Subject - - - false - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 75 - true - - - - DateTime - - - - - - - - - - 0 - 0 - - - - - - - - QLayout::SetDefaultConstraint - - - 0 - - - 0 - - - 0 - - - 0 - - - 6 - - - 0 - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 288 - 17 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 0 - 0 - - - - - 75 - true - - - - Name - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - 32 - 32 - - - - - 32 - 32 - - - - Avatar - - - - - - - - 0 - 0 - - - - - MS Sans Serif - 10 - - - - Comm value - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - - 8 - - - - - - 24 - 16777215 - - - - Qt::NoFocus - - - Toggle Message Read Status - - - true - - - false - - - false - - - - - - - - 75 - true - - - - 0 - - - - - - - I like this - - - - - - - - - - I dislike this - - - - - - - - - - - MS Sans Serif - 10 - 75 - true - - - - Comments - - - @@ -414,25 +132,6 @@ - - - - - 0 - 0 - - - - Qt::NoFocus - - - Unsubscribe From Channel - - - Unsubscribe - - - @@ -569,6 +268,200 @@ + + + + + + + 0 + 0 + + + + + 70 + 70 + + + + + 70 + 70 + + + + + + + true + + + Qt::AlignCenter + + + + + + + + + I like this + + + + + + + + + + + 75 + true + + + + 0 + + + + + + + I dislike this + + + + + + + + + + + + Qt::Vertical + + + + 58 + 40 + + + + + + + + + + + 0 + 0 + + + + + + + + 3 + + + 3 + + + 9 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 288 + 17 + + + + + + + + + 75 + true + + + + DateTime + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Name + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + MS Sans Serif + 10 + + + + Comm value + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + diff --git a/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.ui b/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.ui index e722fa255..b5c3eb9aa 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.ui +++ b/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.ui @@ -24,7 +24,7 @@ 1 - + 0 @@ -310,7 +310,7 @@ - :/images/contacts24.png + :/images/contacts24.png diff --git a/retroshare-gui/src/gui/feeds/GxsForumGroupItem.ui b/retroshare-gui/src/gui/feeds/GxsForumGroupItem.ui index cc3994307..88000d0cb 100644 --- a/retroshare-gui/src/gui/feeds/GxsForumGroupItem.ui +++ b/retroshare-gui/src/gui/feeds/GxsForumGroupItem.ui @@ -24,7 +24,7 @@ 1 - + 0 @@ -310,7 +310,7 @@ - :/images/contacts24.png + :/images/contacts24.png diff --git a/retroshare-gui/src/gui/feeds/GxsForumMsgItem.cpp b/retroshare-gui/src/gui/feeds/GxsForumMsgItem.cpp index 844c0e441..a1a17448c 100644 --- a/retroshare-gui/src/gui/feeds/GxsForumMsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsForumMsgItem.cpp @@ -470,9 +470,9 @@ void GxsForumMsgItem::toggle() void GxsForumMsgItem::setReadStatus(bool isNew, bool /*isUnread*/) { - ui->frame->setProperty("new", isNew); - ui->frame->style()->unpolish(ui->frame); - ui->frame->style()->polish( ui->frame); + ui->mainFrame->setProperty("new", isNew); + ui->mainFrame->style()->unpolish(ui->mainFrame); + ui->mainFrame->style()->polish( ui->mainFrame); } /*********** SPECIFIC FUNCTIONS ***********************/ diff --git a/retroshare-gui/src/gui/feeds/GxsForumMsgItem.ui b/retroshare-gui/src/gui/feeds/GxsForumMsgItem.ui index eaae601da..5967010b7 100644 --- a/retroshare-gui/src/gui/feeds/GxsForumMsgItem.ui +++ b/retroshare-gui/src/gui/feeds/GxsForumMsgItem.ui @@ -24,7 +24,7 @@ 1 - + 0 diff --git a/retroshare-gui/src/gui/feeds/PeerItem.ui b/retroshare-gui/src/gui/feeds/PeerItem.ui index 1b5e93420..230cbd7a4 100644 --- a/retroshare-gui/src/gui/feeds/PeerItem.ui +++ b/retroshare-gui/src/gui/feeds/PeerItem.ui @@ -27,7 +27,7 @@ 1 - + 0 diff --git a/retroshare-gui/src/gui/qss/stylesheet/Standard.qss b/retroshare-gui/src/gui/qss/stylesheet/Standard.qss index a7402d308..aab237d8e 100644 --- a/retroshare-gui/src/gui/qss/stylesheet/Standard.qss +++ b/retroshare-gui/src/gui/qss/stylesheet/Standard.qss @@ -872,7 +872,8 @@ GxsForumThreadWidget QToolButton#subscribeToolButton:hover { border-radius: 4px; } -GxsForumMsgItem QFrame#frame{ +GxsForumMsgItem QFrame#mainFrame, PeerItem QFrame#mainFrame, GxsForumGroupItem QFrame#mainFrame, +GxsChannelGroupItem QFrame#mainFrame { background-color: white; }