From a177d456a114ccd2049f23b9770cbbb408750853 Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 29 Dec 2020 23:43:24 +0100 Subject: [PATCH] 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 --- .../src/gui/TheWire/PulseAddDialog.cpp | 11 +++-- .../src/gui/TheWire/PulseAddDialog.ui | 48 +++++++++++++++---- .../src/gui/TheWire/PulseMessage.ui | 9 +++- retroshare-gui/src/gui/TheWire/PulseReply.ui | 13 ----- .../src/gui/qss/stylesheet/Standard.qss | 11 ++++- 5 files changed, 64 insertions(+), 28 deletions(-) diff --git a/retroshare-gui/src/gui/TheWire/PulseAddDialog.cpp b/retroshare-gui/src/gui/TheWire/PulseAddDialog.cpp index 517088606..ee9c562a2 100644 --- a/retroshare-gui/src/gui/TheWire/PulseAddDialog.cpp +++ b/retroshare-gui/src/gui/TheWire/PulseAddDialog.cpp @@ -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); diff --git a/retroshare-gui/src/gui/TheWire/PulseAddDialog.ui b/retroshare-gui/src/gui/TheWire/PulseAddDialog.ui index b3a21352f..1b8fb24cc 100644 --- a/retroshare-gui/src/gui/TheWire/PulseAddDialog.ui +++ b/retroshare-gui/src/gui/TheWire/PulseAddDialog.ui @@ -14,6 +14,9 @@ + + 0 + 6 @@ -38,6 +41,9 @@ QFrame::Raised + + 0 + @@ -54,25 +60,18 @@ - Post From: + From: - - - - GroupLabel - - - - + IDLabel - + Qt::Horizontal @@ -85,6 +84,35 @@ + + + + GroupLabel + + + + + + + + 32 + 32 + + + + + 32 + 32 + + + + Head + + + true + + + diff --git a/retroshare-gui/src/gui/TheWire/PulseMessage.ui b/retroshare-gui/src/gui/TheWire/PulseMessage.ui index 0163b0122..40e684e60 100644 --- a/retroshare-gui/src/gui/TheWire/PulseMessage.ui +++ b/retroshare-gui/src/gui/TheWire/PulseMessage.ui @@ -49,7 +49,14 @@ - + + + + MS Sans Serif + 10 + + + diff --git a/retroshare-gui/src/gui/TheWire/PulseReply.ui b/retroshare-gui/src/gui/TheWire/PulseReply.ui index eb7390e7e..74b2a8b9e 100644 --- a/retroshare-gui/src/gui/TheWire/PulseReply.ui +++ b/retroshare-gui/src/gui/TheWire/PulseReply.ui @@ -139,19 +139,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - diff --git a/retroshare-gui/src/gui/qss/stylesheet/Standard.qss b/retroshare-gui/src/gui/qss/stylesheet/Standard.qss index 55c114b60..f6f1dd2a9 100644 --- a/retroshare-gui/src/gui/qss/stylesheet/Standard.qss +++ b/retroshare-gui/src/gui/qss/stylesheet/Standard.qss @@ -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; +}