From 8b5c7eddf3a07fbdb922b0ea6736ade574245106 Mon Sep 17 00:00:00 2001 From: defnax Date: Sun, 11 Oct 2020 19:01:46 +0200 Subject: [PATCH] Changed Button for Channel composer * Changed Button type for Channel composer * Set default stylesheet for the Post Button --- .../gui/gxschannels/CreateGxsChannelMsg.cpp | 14 ++++----- .../gui/gxschannels/CreateGxsChannelMsg.ui | 31 ++++++++++++++----- .../src/gui/qss/stylesheet/Standard.qss | 16 ++++++++++ retroshare-gui/src/qss/qdarkstyle-v2.qss | 18 +++++++++++ retroshare-gui/src/qss/qdarkstyle.qss | 26 ++++++++++++++++ 5 files changed, 90 insertions(+), 15 deletions(-) diff --git a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp index 087e29300..f7f8ed726 100644 --- a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp +++ b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp @@ -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... */ diff --git a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.ui b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.ui index 9d296666c..185639054 100644 --- a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.ui +++ b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.ui @@ -329,7 +329,7 @@ p, li { white-space: pre-wrap; } 0 0 - 842 + 81 24 @@ -431,6 +431,9 @@ p, li { white-space: pre-wrap; } + + 9 + @@ -449,15 +452,29 @@ p, li { white-space: pre-wrap; } - - - - + Qt::Horizontal - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + 40 + 20 + + + + + + + + Post + + + + + + + Cancel diff --git a/retroshare-gui/src/gui/qss/stylesheet/Standard.qss b/retroshare-gui/src/gui/qss/stylesheet/Standard.qss index 33998771c..018239298 100644 --- a/retroshare-gui/src/gui/qss/stylesheet/Standard.qss +++ b/retroshare-gui/src/gui/qss/stylesheet/Standard.qss @@ -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 */ diff --git a/retroshare-gui/src/qss/qdarkstyle-v2.qss b/retroshare-gui/src/qss/qdarkstyle-v2.qss index 6a86212c5..e96df4876 100644 --- a/retroshare-gui/src/qss/qdarkstyle-v2.qss +++ b/retroshare-gui/src/qss/qdarkstyle-v2.qss @@ -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; diff --git a/retroshare-gui/src/qss/qdarkstyle.qss b/retroshare-gui/src/qss/qdarkstyle.qss index 6f8f2a0a7..e301f6c53 100644 --- a/retroshare-gui/src/qss/qdarkstyle.qss +++ b/retroshare-gui/src/qss/qdarkstyle.qss @@ -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;