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

View File

@ -329,7 +329,7 @@ p, li { white-space: pre-wrap; }
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>842</width> <width>81</width>
<height>24</height> <height>24</height>
</rect> </rect>
</property> </property>
@ -431,6 +431,9 @@ p, li { white-space: pre-wrap; }
</item> </item>
<item row="2" column="0" colspan="3"> <item row="2" column="0" colspan="3">
<layout class="QHBoxLayout" name="buttonHLayout"> <layout class="QHBoxLayout" name="buttonHLayout">
<property name="spacing">
<number>9</number>
</property>
<item> <item>
<widget class="QCheckBox" name="generateCheckBox"> <widget class="QCheckBox" name="generateCheckBox">
<property name="text"> <property name="text">
@ -449,15 +452,29 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <spacer name="horizontalSpacer_3">
<property name="styleSheet">
<string notr="true"/>
</property>
<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>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> </property>
</widget> </widget>
</item> </item>

View File

@ -115,7 +115,23 @@ GxsCreateCommentDialog QFrame#frame {
background: white; 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 */ /* 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{ QTabBar#smTab::tab{
height: 32px; height: 32px;
width: 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{ QTabBar#smTab::tab{
height: 32px; height: 32px;
width: 32px; width: 32px;
@ -1286,6 +1304,14 @@ BoardPostDisplayWidget_compact QLabel#pictureLabel{
border-radius: 3px; 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 BoardPostDisplayWidget_card QToolButton#voteDownButton, QToolButton#voteUpButton
{ {
border: none; border: none;