Improved again reply comment dialog

Added frame for better see reply field with white background
Set strings for "Reply as" and for window title
This commit is contained in:
defnax 2019-01-12 14:08:31 +01:00
parent 2d096e3179
commit 2fc0c643ef
3 changed files with 192 additions and 106 deletions

View File

@ -45,6 +45,7 @@ GxsCreateCommentDialog::GxsCreateCommentDialog(TokenQueue *tokQ, RsGxsCommentSer
void GxsCreateCommentDialog::loadComment(const QString &msgText, const QString &msgAuthor, const RsGxsId &msgAuthorId) void GxsCreateCommentDialog::loadComment(const QString &msgText, const QString &msgAuthor, const RsGxsId &msgAuthorId)
{ {
setWindowTitle(tr("Reply to Comment") );
ui->titleLabel->setId(msgAuthorId); ui->titleLabel->setId(msgAuthorId);
ui->commentLabel->setText(msgText); ui->commentLabel->setText(msgText);
@ -56,6 +57,7 @@ void GxsCreateCommentDialog::loadComment(const QString &msgText, const QString &
ui->commentTextEdit->setPlaceholderText( tr("Type your reply")); ui->commentTextEdit->setPlaceholderText( tr("Type your reply"));
ui->buttonBox->button(QDialogButtonBox::Ok)->setText("Reply"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText("Reply");
ui->signedLabel->setText("Reply as");
} }
void GxsCreateCommentDialog::createComment() void GxsCreateCommentDialog::createComment()

View File

@ -13,125 +13,193 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Make Comment</string> <string>Make Comment</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="1" colspan="2"> <property name="leftMargin">
<widget class="GxsIdLabel" name="titleLabel"> <number>0</number>
<property name="text"> </property>
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <property name="topMargin">
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; <number>0</number>
p, li { white-space: pre-wrap; } </property>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; <property name="rightMargin">
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Compose new Comment&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QFrame" name="frame">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="2">
<widget class="AvatarWidget" name="avatarLabel">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>52</width> <width>0</width>
<height>52</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>52</width> <width>16777215</width>
<height>52</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="text"> <property name="styleSheet">
<string/> <string notr="true"/>
</property> </property>
<property name="scaledContents"> <property name="frameShape">
<bool>true</bool> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" rowspan="2">
<widget class="AvatarWidget" name="avatarLabel">
<property name="minimumSize">
<size>
<width>52</width>
<height>52</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>52</width>
<height>52</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="GxsIdLabel" name="titleLabel">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Compose new Comment&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="commentLabel">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>35</width>
<height>6</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget> </widget>
</item> </item>
<item row="3" column="0" colspan="3"> <item row="1" column="0">
<layout class="QVBoxLayout" name="mainVLayout"> <widget class="QFrame" name="messageframe">
<item> <layout class="QVBoxLayout" name="mainVLayout">
<widget class="GxsIdLabel" name="replaytolabel"> <property name="leftMargin">
<property name="styleSheet"> <number>9</number>
<string notr="true"/> </property>
</property> <property name="topMargin">
<property name="text"> <number>6</number>
<string/> </property>
</property> <property name="rightMargin">
</widget> <number>9</number>
</item> </property>
<item> <property name="bottomMargin">
<widget class="MimeTextEdit" name="commentTextEdit"> <number>9</number>
<property name="styleSheet"> </property>
<string notr="true"/> <item>
</property> <widget class="GxsIdLabel" name="replaytolabel">
<property name="placeholderText"> <property name="styleSheet">
<string>Type your comment</string> <string notr="true"/>
</property> </property>
</widget> <property name="text">
</item> <string/>
<item> </property>
<layout class="QHBoxLayout" name="signedHLayout"> </widget>
<item> </item>
<widget class="QLabel" name="signedLabel"> <item>
<property name="text"> <widget class="MimeTextEdit" name="commentTextEdit">
<string>Post as:</string> <property name="styleSheet">
</property> <string notr="true"/>
</widget> </property>
</item> <property name="placeholderText">
<item> <string>Type your comment</string>
<widget class="GxsIdChooser" name="idChooser"> </property>
<property name="sizePolicy"> </widget>
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> </item>
<horstretch>0</horstretch> <item>
<verstretch>0</verstretch> <layout class="QHBoxLayout" name="signedHLayout">
</sizepolicy> <item>
</property> <widget class="QLabel" name="signedLabel">
<property name="sizeAdjustPolicy"> <property name="text">
<enum>QComboBox::AdjustToContentsOnFirstShow</enum> <string>Post as:</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item>
</item> <widget class="GxsIdChooser" name="idChooser">
</layout> <property name="sizePolicy">
</item> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<item row="2" column="0"> <horstretch>0</horstretch>
<spacer name="verticalSpacer"> <verstretch>0</verstretch>
<property name="orientation"> </sizepolicy>
<enum>Qt::Vertical</enum> </property>
</property> <property name="sizeAdjustPolicy">
<property name="sizeHint" stdset="0"> <enum>QComboBox::AdjustToContentsOnFirstShow</enum>
<size> </property>
<width>20</width> </widget>
<height>40</height> </item>
</size> </layout>
</property> </item>
</spacer> <item>
</item> <widget class="QDialogButtonBox" name="buttonBox">
<item row="1" column="1" rowspan="2" colspan="2"> <property name="orientation">
<widget class="QLabel" name="commentLabel"> <enum>Qt::Horizontal</enum>
<property name="text"> </property>
<string/> <property name="standardButtons">
</property> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<property name="alignment"> </property>
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> </widget>
</property> </item>
<property name="wordWrap"> </layout>
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>

View File

@ -111,6 +111,11 @@ GxsCreateCommentDialog QLabel#replaytolabel {
color: gray; color: gray;
} }
GxsCreateCommentDialog QFrame#frame {
background: white;
}
/* Forums */ /* Forums */
@ -806,3 +811,14 @@ GenCertDialog QFrame#profileframe{
border-image: url(:/images/logo/background.png) 0 0 0 0 stretch stretch; border-image: url(:/images/logo/background.png) 0 0 0 0 stretch stretch;
border-width: 0px; border-width: 0px;
} }
PostedListWidget QComboBox#comboBox {
font: bold;
font-size: 15px;
color: #0099cc;
}
PostedListWidget QToolButton#submitPostButton {
font: bold;
font-size: 15px;
}