Changed the buttons to use QPushButton which is easier with stylesheets

* Changed the buttons to use QPushButton which is easier with stylesheets
* Use standard strings Create or Post or Update ( not more OK or Send)
*Added default stylesheet colors for Create & Post Buttons
This commit is contained in:
defnax 2020-10-12 21:46:06 +02:00
parent ce6fb603c7
commit df29e22be0
11 changed files with 339 additions and 237 deletions

View file

@ -60,8 +60,8 @@ CreateCircleDialog::CreateCircleDialog()
connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addMember()));
connect(ui.removeButton, SIGNAL(clicked()), this, SLOT(removeMember()));
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(createCircle()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect(ui.createButton, SIGNAL(clicked()), this, SLOT(createCircle()));
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(close()));
connect(ui.treeWidget_membership, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(selectedMember(QTreeWidgetItem*, QTreeWidgetItem*)));
connect(ui.treeWidget_IdList, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(selectedId(QTreeWidgetItem*, QTreeWidgetItem*)));
@ -146,15 +146,15 @@ void CreateCircleDialog::editExistingId(const RsGxsGroupId &circleId, const bool
ui.idChooser->setVisible(true) ;
}
ui.buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Update"));
ui.createButton->setText(tr("Update"));
ui.addButton->setEnabled(!readonly) ;
ui.removeButton->setEnabled(!readonly) ;
if(readonly)
{
ui.buttonBox->setStandardButtons(QDialogButtonBox::Cancel);
ui.buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Close"));
ui.createButton->hide() ;
ui.cancelButton->setText(tr("Close"));
ui.peersSelection_GB->hide() ;
ui.addButton->hide() ;
ui.removeButton->hide() ;
@ -175,7 +175,7 @@ void CreateCircleDialog::editNewId(bool isExternal)
{
setupForExternalCircle();
ui.headerFrame->setHeaderText(tr("Create New Circle"));
ui.buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Create"));
ui.createButton->setText(tr("Create"));
}
else
{