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

View File

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

View File

@ -49,7 +49,14 @@
</widget>
</item>
<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 row="1" column="1">
<widget class="QFrame" name="frame_expand">

View File

@ -139,19 +139,6 @@
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<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>
<widget class="QToolButton" name="toolButton_reply">
<property name="text">

View File

@ -1116,10 +1116,14 @@ PulseAddDialog QTextEdit#textEdit_Pulse {
background: white;
}
PulseAddDialog QFrame#frame_input, QFrame#frame_reply {
PulseAddDialog QFrame#frame_input, QFrame#frame_reply, QFrame#frame {
border: 0px;
}
PulseAddDialog QLabel#label_groupName {
font-size: 12pt;
}
PulseReply #line_replyLine , PulseMessage #line{
color: #7ecbfb;
}
@ -1127,3 +1131,8 @@ PulseReply #line_replyLine , PulseMessage #line{
WireDialog QLabel#label_viewMode {
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;
}