[Gui] remove unused help button from preferences dialog

- is by default in the title bar of Qt dialogs, has to be removed explicitly when unused

- also fix too long code lines
This commit is contained in:
Uwe
2023-02-25 04:09:12 +01:00
parent 6c3efbdb3b
commit 77b7af3e60
3 changed files with 6 additions and 3 deletions

View File

@@ -74,6 +74,8 @@ DlgPreferencesImp::DlgPreferencesImp(QWidget* parent, Qt::WindowFlags fl)
int length = QtTools::horizontalAdvance(fm, longestGroupName());
ui->listBox->setFixedWidth(Base::clamp<int>(length + 20, 108, 120));
ui->listBox->setGridSize(QSize(108, 75));
// remove unused help button
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
connect(ui->buttonBox, &QDialogButtonBox::clicked,
this, &DlgPreferencesImp::onButtonBoxClicked);

View File

@@ -21,7 +21,6 @@
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <QPushButton>
#endif
@@ -45,7 +44,8 @@ DlgSettingsViewColor::DlgSettingsViewColor(QWidget* parent)
ui->setupUi(this);
ui->HighlightColor->setEnabled(ui->checkBoxPreselection->isChecked());
ui->SelectionColor->setEnabled(ui->checkBoxSelection->isChecked());
connect(ui->SwitchGradientColors, &QPushButton::pressed, this, &DlgSettingsViewColor::onSwitchGradientColorsPressed);
connect(ui->SwitchGradientColors, &QPushButton::pressed, this,
&DlgSettingsViewColor::onSwitchGradientColorsPressed);
}
/**

View File

@@ -3235,7 +3235,8 @@ void DocumentItem::slotInEdit(const Gui::ViewProviderDocumentObject& v)
{
(void)v;
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/TreeView");
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
"User parameter:BaseApp/Preferences/TreeView");
unsigned long col = hGrp->GetUnsigned("TreeEditColor", 4294902015);
QColor color((col >> 24) & 0xff, (col >> 16) & 0xff, (col >> 8) & 0xff);