fixed the "new" property so that the style can act on it

This commit is contained in:
csoler 2020-10-02 21:38:36 +02:00
parent 6d8f5512f9
commit 780ffe3504
4 changed files with 12 additions and 2 deletions

View File

@ -117,6 +117,10 @@ void BoardPostDisplayWidgetBase::setReadStatus(bool isNew, bool isUnread)
readButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-read.png"));
newLabel()->setVisible(isNew);
mainFrame()->setProperty("new", isNew);
mainFrame()->style()->unpolish(mainFrame());
mainFrame()->style()->polish(mainFrame());
}
void BoardPostDisplayWidget_compact::doExpand(bool e)
@ -439,6 +443,7 @@ QLabel *BoardPostDisplayWidget_compact::scoreLabel() { return ui->sc
QLabel *BoardPostDisplayWidget_compact::notes() { return ui->notes; }
QPushButton *BoardPostDisplayWidget_compact::shareButton() { return ui->shareButton; }
QLabel *BoardPostDisplayWidget_compact::pictureLabel() { return ui->pictureLabel; }
QFrame *BoardPostDisplayWidget_compact::mainFrame() { return ui->mainFrame; }
//===================================================================================================================================
//== class BoardPostDisplayWidget_card ==
@ -508,4 +513,5 @@ QLabel *BoardPostDisplayWidget_card::scoreLabel() { return ui->score
QLabel *BoardPostDisplayWidget_card::notes() { return ui->notes; }
QPushButton *BoardPostDisplayWidget_card::shareButton() { return ui->shareButton; }
QLabel *BoardPostDisplayWidget_card::pictureLabel() { return ui->pictureLabel; }
QFrame *BoardPostDisplayWidget_card::mainFrame() { return ui->mainFrame; }

View File

@ -31,6 +31,7 @@ class BoardPostDisplayWidget_compact;
}
class QPushButton;
class QFrame;
class QLabel;
class QToolButton;
class QTextEdit;
@ -79,6 +80,7 @@ protected slots:
virtual QLabel *pictureLabel()=0;
virtual QToolButton *readButton() =0;
virtual QPushButton *shareButton() =0;
virtual QFrame *mainFrame() =0;
void loadComments(bool e);
void showAuthorInPeople();
@ -125,6 +127,7 @@ public:
QLabel *pictureLabel() override;
QToolButton *readButton() override;
QPushButton *shareButton() override;
QFrame *mainFrame() override;
public slots:
void viewPicture() ;
@ -164,6 +167,7 @@ public:
QToolButton *readButton() override;
QPushButton *shareButton() override;
QLabel *pictureLabel() override;
QFrame *mainFrame() override;
protected slots:
/* GxsGroupFeedItem */

View File

@ -42,7 +42,7 @@
<number>2</number>
</property>
<item>
<widget class="QFrame" name="frame">
<widget class="QFrame" name="mainFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>

View File

@ -42,7 +42,7 @@
<number>2</number>
</property>
<item>
<widget class="QFrame" name="frame">
<widget class="QFrame" name="mainFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>