Merge pull request #2210 from defnax/wiki-fixes

Added to store the splitter position for Wire Dialog & stylesheet fixes
This commit is contained in:
defnax 2021-01-08 19:18:16 +01:00 committed by GitHub
commit cc15593202
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 8 deletions

View File

@ -22,6 +22,7 @@
#include "WireGroupDialog.h"
#include "WireGroupItem.h"
#include "gui/settings/rsharesettings.h"
#include "PulseViewGroup.h"
#include "PulseReplySeperator.h"
@ -87,6 +88,36 @@ WireDialog::WireDialog(QWidget *parent)
// just for testing
postTestTwitterView();
// load settings
processSettings(true);
}
WireDialog::~WireDialog()
{
// save settings
processSettings(false);
delete(mWireQueue);
}
void WireDialog::processSettings(bool load)
{
Settings->beginGroup("WireDialog");
if (load) {
// load settings
// state of splitter
ui.splitter->restoreState(Settings->value("SplitterWire").toByteArray());
} else {
// save settings
// state of splitter
Settings->setValue("SplitterWire", ui.splitter->saveState());
}
Settings->endGroup();
}
void WireDialog::refreshGroups()
@ -94,7 +125,6 @@ void WireDialog::refreshGroups()
requestGroupData();
}
void WireDialog::addGroup(QWidget *item)
{
QLayout *alayout = ui.scrollAreaWidgetContents_groups->layout();

View File

@ -74,6 +74,7 @@ class WireDialog : public MainPage, public TokenResponse, public WireGroupHolder
public:
WireDialog(QWidget *parent = 0);
~WireDialog();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_WIRE) ; }
virtual QString pageName() const { return tr("The Wire") ; }
@ -142,6 +143,8 @@ private:
void showSelectedGroups();
void updateGroups(std::vector<RsWireGroup> &groups);
void processSettings(bool load);
// utils.
rstime_t getFilterTimestamp();

View File

@ -137,7 +137,7 @@ CreateCircleDialog QPushButton#createButton, CreateLobbyDialog QPushButton#creat
IdEditDialog QPushButton#createButton, CreateGxsForumMsg QPushButton#postButton,
GxsCreateCommentDialog QPushButton#postButton, GxsGroupDialog QPushButton#createButton,
PulseAddDialog QPushButton#pushButton_Post, PulseTopLevel QToolButton#toolButton_follow,
PulseViewGroup QToolButton#toolButton_follow{
PulseViewGroup QToolButton#toolButton_follow, WikiEditDialog QPushButton#pushButton_Submit{
font: bold;
font-size: 15px;
color: white;
@ -154,7 +154,8 @@ CreateCircleDialog QPushButton#createButton:hover, CreateLobbyDialog QPushButton
IdEditDialog QPushButton#createButton:hover, CreateGxsForumMsg QPushButton#postButton:hover,
GxsCreateCommentDialog QPushButton#postButton:hover, GxsGroupDialog QPushButton#createButton:hover,
ShareManager QPushButton#closeButton:hover, PulseAddDialog QPushButton#pushButton_Post:hover,
PulseTopLevel QToolButton#toolButton_follow:hover, PulseViewGroup QToolButton#toolButton_follow:hover{
PulseTopLevel QToolButton#toolButton_follow:hover, PulseViewGroup QToolButton#toolButton_follow:hover,
WikiEditDialog QPushButton#pushButton_Submit:hover{
background: #03b1f3;
border-radius: 4px;
min-width: 4em;
@ -214,7 +215,7 @@ SearchDialog QPushButton#pushButtonSearch:hover{
CreateGxsForumMsg QPushButton#postButton:disabled, PostedCreatePostDialog QPushButton#submitButton:disabled,
CreateGxsChannelMsg QPushButton#postButton:disabled, GxsCreateCommentDialog QPushButton#postButton:disabled,
PulseAddDialog QPushButton#pushButton_Post:disabled {
PulseAddDialog QPushButton#pushButton_Post:disabled, WikiEditDialog QPushButton#pushButton_Submit:disabled {
font: bold;
font-size: 15px;
color: white;
@ -1105,13 +1106,12 @@ MainWindow QListWidget {
}
PulseTopLevel QFrame#frame, PulseViewGroup QFrame#frame, PulseReply QFrame#frame {
border: 2px solid #7ecbfb;
border-radius: 6px;
border: 2px solid #c4cfd6;
background: white;
}
PulseAddDialog QTextEdit#textEdit_Pulse {
border: 2px solid #7ecbfb;
border: 2px solid #c4cfd6;
border-radius: 6px;
background: white;
}
@ -1125,7 +1125,7 @@ PulseAddDialog QLabel#label_groupName {
}
PulseReply #line_replyLine , PulseMessage #line{
color: #7ecbfb;
color: #c4cfd6;
}
PulseReply QLabel#label_groupName{