More wire ui fixes

* Added a Top Avatar Label when its a new Post.
* Hide Top Avatar on replies
* Wire stylesheet fixes.
* Fixed place holder text cleanup
This commit is contained in:
defnax 2020-12-29 23:43:24 +01:00
parent b4557064a5
commit a177d456a1
5 changed files with 64 additions and 28 deletions

View File

@ -53,16 +53,17 @@ void PulseAddDialog::setGroup(RsWireGroup &group)
ui.label_groupName->setText(QString::fromStdString(group.mMeta.mGroupName)); ui.label_groupName->setText(QString::fromStdString(group.mMeta.mGroupName));
ui.label_idName->setText(QString::fromStdString(group.mMeta.mAuthorId.toStdString())); ui.label_idName->setText(QString::fromStdString(group.mMeta.mAuthorId.toStdString()));
if (mGroup.mHeadshot.mData ) if (group.mHeadshot.mData )
{ {
QPixmap pixmap; QPixmap pixmap;
if (GxsIdDetails::loadPixmapFromData( if (GxsIdDetails::loadPixmapFromData(
mGroup.mHeadshot.mData, group.mHeadshot.mData,
mGroup.mHeadshot.mSize, group.mHeadshot.mSize,
pixmap,GxsIdDetails::ORIGINAL)) pixmap,GxsIdDetails::ORIGINAL))
{ {
pixmap = pixmap.scaled(50,50); pixmap = pixmap.scaled(50,50);
ui.headshot->setPixmap(pixmap); ui.headshot->setPixmap(pixmap);
ui.topheadshot->setPixmap(pixmap);
} }
} }
else else
@ -70,6 +71,7 @@ void PulseAddDialog::setGroup(RsWireGroup &group)
// default. // default.
QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/wire.png").scaled(50,50); QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/wire.png").scaled(50,50);
ui.headshot->setPixmap(pixmap); ui.headshot->setPixmap(pixmap);
ui.topheadshot->setPixmap(pixmap);
} }
mGroup = group; mGroup = group;
@ -129,9 +131,11 @@ void PulseAddDialog::cleanup()
ui.pushButton_Post->setEnabled(false); ui.pushButton_Post->setEnabled(false);
ui.pushButton_Post->setText(tr("Post")); ui.pushButton_Post->setText(tr("Post"));
ui.textEdit_Pulse->setPlaceholderText(tr("Whats happening?"));
ui.frame_input->setVisible(true); ui.frame_input->setVisible(true);
ui.widget_sentiment->setVisible(true); ui.widget_sentiment->setVisible(true);
ui.pushButton_picture->show(); ui.pushButton_picture->show();
ui.topheadshot->show();
// cleanup images. // cleanup images.
mImage1.clear(); mImage1.clear();
@ -171,6 +175,7 @@ void PulseAddDialog::setReplyTo(RsWirePulse &pulse, RsWirePulseSPtr pPulse, std:
mReplyType = replyType; mReplyType = replyType;
ui.frame_reply->setVisible(true); ui.frame_reply->setVisible(true);
ui.pushButton_picture->show(); ui.pushButton_picture->show();
ui.topheadshot->hide();
{ {
PulseReply *reply = new PulseReply(NULL, pPulse); PulseReply *reply = new PulseReply(NULL, pPulse);

View File

@ -14,6 +14,9 @@
<string/> <string/>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<property name="topMargin">
<number>0</number>
</property>
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
@ -38,6 +41,9 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="maximumSize"> <property name="maximumSize">
@ -54,25 +60,18 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>Post From:</string> <string>From:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="3">
<widget class="QLabel" name="label_groupName">
<property name="text">
<string>GroupLabel</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="GxsIdLabel" name="label_idName"> <widget class="GxsIdLabel" name="label_idName">
<property name="text"> <property name="text">
<string>IDLabel</string> <string>IDLabel</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="3"> <item row="0" column="4">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -85,6 +84,35 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="2">
<widget class="QLabel" name="label_groupName">
<property name="text">
<string>GroupLabel</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="topheadshot">
<property name="minimumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string>Head</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@ -49,7 +49,14 @@
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QTextBrowser" name="textBrowser"/> <widget class="QTextBrowser" name="textBrowser">
<property name="font">
<font>
<family>MS Sans Serif</family>
<pointsize>10</pointsize>
</font>
</property>
</widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QFrame" name="frame_expand"> <widget class="QFrame" name="frame_expand">

View File

@ -139,19 +139,6 @@
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QToolButton" name="toolButton_reply"> <widget class="QToolButton" name="toolButton_reply">
<property name="text"> <property name="text">

View File

@ -1116,10 +1116,14 @@ PulseAddDialog QTextEdit#textEdit_Pulse {
background: white; background: white;
} }
PulseAddDialog QFrame#frame_input, QFrame#frame_reply { PulseAddDialog QFrame#frame_input, QFrame#frame_reply, QFrame#frame {
border: 0px; border: 0px;
} }
PulseAddDialog QLabel#label_groupName {
font-size: 12pt;
}
PulseReply #line_replyLine , PulseMessage #line{ PulseReply #line_replyLine , PulseMessage #line{
color: #7ecbfb; color: #7ecbfb;
} }
@ -1127,3 +1131,8 @@ PulseReply #line_replyLine , PulseMessage #line{
WireDialog QLabel#label_viewMode { WireDialog QLabel#label_viewMode {
font-size: 12pt; font-size: 12pt;
} }
WireGroupDialog QFrame#frame {
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #9BDBF9, stop:1 #1592CD);
border: 0px;
}