Changed Button for Channel composer

* Changed Button type for Channel composer
* Set default stylesheet for the Post Button
This commit is contained in:
defnax 2020-10-11 19:01:46 +02:00
parent 4741049707
commit 8b5c7eddf3
5 changed files with 90 additions and 15 deletions

View File

@ -65,10 +65,8 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
setAttribute ( Qt::WA_DeleteOnClose, true );
buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Post"));
connect(buttonBox, SIGNAL(accepted()), this, SLOT(sendMsg()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(cancelMsg()));
connect(postButton, SIGNAL(clicked()), this, SLOT(sendMsg()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelMsg()));
connect(addFileButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
connect(addfilepushButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
@ -599,8 +597,8 @@ void CreateGxsChannelMsg::checkAttachmentReady()
* recognized by librs but not correctly by gui (can't
* formally remove it)
*/
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
buttonBox->button(QDialogButtonBox::Cancel)->setEnabled(false);
postButton->setEnabled(false);
cancelButton->setEnabled(false);
break;
}
}
@ -608,8 +606,8 @@ void CreateGxsChannelMsg::checkAttachmentReady()
if (fit == mAttachments.end())
{
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
buttonBox->button(QDialogButtonBox::Cancel)->setEnabled(true);
postButton->setEnabled(true);
cancelButton->setEnabled(true);
}
/* repeat... */

View File

@ -329,7 +329,7 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
<width>842</width>
<width>81</width>
<height>24</height>
</rect>
</property>
@ -431,6 +431,9 @@ p, li { white-space: pre-wrap; }
</item>
<item row="2" column="0" colspan="3">
<layout class="QHBoxLayout" name="buttonHLayout">
<property name="spacing">
<number>9</number>
</property>
<item>
<widget class="QCheckBox" name="generateCheckBox">
<property name="text">
@ -449,15 +452,29 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="styleSheet">
<string notr="true"/>
</property>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="postButton">
<property name="text">
<string>Post</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>

View File

@ -115,7 +115,23 @@ GxsCreateCommentDialog QFrame#frame {
background: white;
}
CreateGxsChannelMsg QPushButton#postButton {
font: bold;
font-size: 15px;
color: white;
background: #0099cc;
border-radius: 4px;
max-height: 27px;
min-width: 4em;
padding: 2px;
}
CreateGxsChannelMsg QPushButton#postButton:hover {
background: #03b1f3;
border-radius: 4px;
min-width: 4em;
padding: 2px;
}
/* Forums */

View File

@ -2052,6 +2052,24 @@ GxsChannelPostsWidgetWithModel QToolButton#subscribeToolButton::menu-button {
}
CreateGxsChannelMsg QPushButton#postButton {
font: bold;
font-size: 15px;
color: white;
background: #0099cc;
border-radius: 4px;
max-height: 27px;
min-width: 4em;
padding: 2px;
}
CreateGxsChannelMsg QPushButton#postButton:hover {
background: #03b1f3;
border-radius: 4px;
min-width: 4em;
padding: 2px;
}
QTabBar#smTab::tab{
height: 32px;
width: 32px;

View File

@ -1217,6 +1217,24 @@ GxsChannelPostsWidgetWithModel QToolButton#subscribeToolButton::menu-button {
}
CreateGxsChannelMsg QPushButton#postButton {
font: bold;
font-size: 15px;
color: white;
background: #0099cc;
border-radius: 4px;
max-height: 27px;
min-width: 4em;
padding: 2px;
}
CreateGxsChannelMsg QPushButton#postButton:hover {
background: #03b1f3;
border-radius: 4px;
min-width: 4em;
padding: 2px;
}
QTabBar#smTab::tab{
height: 32px;
width: 32px;
@ -1286,6 +1304,14 @@ BoardPostDisplayWidget_compact QLabel#pictureLabel{
border-radius: 3px;
}
BoardPostDisplayWidget_compact > QFrame#frame [new=false]{
background: #302F2F;
}
BoardPostDisplayWidget_compact > QFrame#frame[new=true] {
background-color: #005000;
}
BoardPostDisplayWidget_card QToolButton#voteDownButton, QToolButton#voteUpButton
{
border: none;