Changed button type for Comments Composer & update the stylesheets

This commit is contained in:
defnax 2020-10-13 22:12:37 +02:00
parent 30ee2f8ee7
commit 5ed38fe6ea
5 changed files with 50 additions and 26 deletions

View File

@ -31,8 +31,8 @@ GxsCreateCommentDialog::GxsCreateCommentDialog(RsGxsCommentService *service, co
ui(new Ui::GxsCreateCommentDialog), mCommentService(service), mParentId(parentId), mThreadId(threadId) ui(new Ui::GxsCreateCommentDialog), mCommentService(service), mParentId(parentId), mThreadId(threadId)
{ {
ui->setupUi(this); ui->setupUi(this);
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(createComment())); connect(ui->postButton, SIGNAL(clicked()), this, SLOT(createComment()));
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(close()));
/* fill in the available OwnIds for signing */ /* fill in the available OwnIds for signing */
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, default_author); ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, default_author);
@ -52,7 +52,7 @@ void GxsCreateCommentDialog::loadComment(const QString &msgText, const QString &
ui->replaytolabel->setText( tr("Replying to") + " @" + msgAuthor); ui->replaytolabel->setText( tr("Replying to") + " @" + msgAuthor);
ui->commentTextEdit->setPlaceholderText( tr("Type your reply")); ui->commentTextEdit->setPlaceholderText( tr("Type your reply"));
ui->buttonBox->button(QDialogButtonBox::Ok)->setText("Reply"); ui->postButton->setText("Reply");
ui->signedLabel->setText("Reply as"); ui->signedLabel->setText("Reply as");
} }

View File

@ -138,20 +138,11 @@ p, li { white-space: pre-wrap; }
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QFrame" name="messageframe"> <widget class="QFrame" name="messageframe">
<layout class="QVBoxLayout" name="mainVLayout"> <layout class="QGridLayout" name="gridLayout_3">
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin"> <property name="topMargin">
<number>6</number> <number>6</number>
</property> </property>
<property name="rightMargin"> <item row="0" column="0">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<item>
<widget class="GxsIdLabel" name="replaytolabel"> <widget class="GxsIdLabel" name="replaytolabel">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
@ -161,7 +152,7 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="0" colspan="3">
<widget class="MimeTextEdit" name="commentTextEdit"> <widget class="MimeTextEdit" name="commentTextEdit">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
@ -171,7 +162,7 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="0" colspan="3">
<layout class="QHBoxLayout" name="signedHLayout"> <layout class="QHBoxLayout" name="signedHLayout">
<item> <item>
<widget class="QLabel" name="signedLabel"> <widget class="QLabel" name="signedLabel">
@ -195,13 +186,30 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</item> </item>
<item> <item row="3" column="0">
<widget class="QDialogButtonBox" name="buttonBox"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="standardButtons"> <property name="sizeHint" stdset="0">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> <size>
<width>276</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="postButton">
<property name="text">
<string>Post</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -134,7 +134,8 @@ CreateGxsChannelMsg QPushButton#postButton:hover {
} }
CreateCircleDialog QPushButton#createButton, CreateLobbyDialog QPushButton#createButton, CreateCircleDialog QPushButton#createButton, CreateLobbyDialog QPushButton#createButton,
IdEditDialog QPushButton#createButton, CreateGxsForumMsg QPushButton#postButton { IdEditDialog QPushButton#createButton, CreateGxsForumMsg QPushButton#postButton,
GxsCreateCommentDialog QPushButton#postButton {
font: bold; font: bold;
font-size: 15px; font-size: 15px;
color: white; color: white;
@ -146,7 +147,8 @@ IdEditDialog QPushButton#createButton, CreateGxsForumMsg QPushButton#postButton
} }
CreateCircleDialog QPushButton#createButton:hover, CreateLobbyDialog QPushButton#createButton:hover, CreateCircleDialog QPushButton#createButton:hover, CreateLobbyDialog QPushButton#createButton:hover,
IdEditDialog QPushButton#createButton:hover, CreateGxsForumMsg QPushButton#postButton:hover { IdEditDialog QPushButton#createButton:hover, CreateGxsForumMsg QPushButton#postButton:hover,
GxsCreateCommentDialog QPushButton#postButton:hover {
background: #03b1f3; background: #03b1f3;
border-radius: 4px; border-radius: 4px;
min-width: 4em; min-width: 4em;

View File

@ -2071,7 +2071,8 @@ CreateGxsChannelMsg QPushButton#postButton:hover {
} }
CreateCircleDialog QPushButton#createButton, CreateLobbyDialog QPushButton#createButton, CreateCircleDialog QPushButton#createButton, CreateLobbyDialog QPushButton#createButton,
IdEditDialog QPushButton#createButton, CreateGxsForumMsg QPushButton#postButton { IdEditDialog QPushButton#createButton, CreateGxsForumMsg QPushButton#postButton,
GxsCreateCommentDialog QPushButton#postButton {
font: bold; font: bold;
font-size: 15px; font-size: 15px;
color: white; color: white;
@ -2083,7 +2084,8 @@ IdEditDialog QPushButton#createButton, CreateGxsForumMsg QPushButton#postButton
} }
CreateCircleDialog QPushButton#createButton:hover, CreateLobbyDialog QPushButton#createButton:hover, CreateCircleDialog QPushButton#createButton:hover, CreateLobbyDialog QPushButton#createButton:hover,
IdEditDialog QPushButton#createButton:hover, CreateGxsForumMsg QPushButton#postButton:hover { IdEditDialog QPushButton#createButton:hover, CreateGxsForumMsg QPushButton#postButton:hover,
GxsCreateCommentDialog QPushButton#postButton:hover {
background: #03b1f3; background: #03b1f3;
border-radius: 4px; border-radius: 4px;
min-width: 4em; min-width: 4em;
@ -2106,6 +2108,11 @@ QTabBar#smTab::tab{
width: 32px; width: 32px;
} }
QLabel#avatarLabel{
border: 2px solid #CCCCCC;
border-radius: 4px;
}
PostedCreatePostDialog QPushButton#submitButton { PostedCreatePostDialog QPushButton#submitButton {
font: bold; font: bold;
font-size: 15px; font-size: 15px;

View File

@ -1236,7 +1236,8 @@ CreateGxsChannelMsg QPushButton#postButton:hover {
} }
CreateCircleDialog QPushButton#createButton, CreateLobbyDialog QPushButton#createButton, CreateCircleDialog QPushButton#createButton, CreateLobbyDialog QPushButton#createButton,
IdEditDialog QPushButton#createButton, CreateGxsForumMsg QPushButton#postButton { IdEditDialog QPushButton#createButton, CreateGxsForumMsg QPushButton#postButton,
GxsCreateCommentDialog QPushButton#postButton {
font: bold; font: bold;
font-size: 15px; font-size: 15px;
color: white; color: white;
@ -1248,7 +1249,8 @@ IdEditDialog QPushButton#createButton, CreateGxsForumMsg QPushButton#postButton
} }
CreateCircleDialog QPushButton#createButton:hover, CreateLobbyDialog QPushButton#createButton:hover, CreateCircleDialog QPushButton#createButton:hover, CreateLobbyDialog QPushButton#createButton:hover,
IdEditDialog QPushButton#createButton:hover, CreateGxsForumMsg QPushButton#postButton:hover { IdEditDialog QPushButton#createButton:hover, CreateGxsForumMsg QPushButton#postButton:hover,
GxsCreateCommentDialog QPushButton#postButton:hover {
background: #03b1f3; background: #03b1f3;
border-radius: 4px; border-radius: 4px;
min-width: 4em; min-width: 4em;
@ -1271,6 +1273,11 @@ QTabBar#smTab::tab{
width: 32px; width: 32px;
} }
QLabel#avatarLabel{
border: 2px solid #CCCCCC;
border-radius: 4px;
}
PostedCreatePostDialog QPushButton#submitButton { PostedCreatePostDialog QPushButton#submitButton {
font: bold; font: bold;
font-size: 15px; font-size: 15px;