diff --git a/src/Gui/DlgSettingsSelection.cpp b/src/Gui/DlgSettingsSelection.cpp index 1f29bc5bd9..c26114fe0f 100644 --- a/src/Gui/DlgSettingsSelection.cpp +++ b/src/Gui/DlgSettingsSelection.cpp @@ -45,6 +45,10 @@ DlgSettingsSelection::~DlgSettingsSelection() void DlgSettingsSelection::saveSettings() { + ui->checkBoxPreselection->onSave(); + ui->checkBoxSelection->onSave(); + ui->HighlightColor->onSave(); + ui->SelectionColor->onSave(); ui->spinPickRadius->onSave(); auto handle = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/TreeView"); handle->SetBool("SyncView", ui->checkBoxAutoSwitch->isChecked()); @@ -56,6 +60,10 @@ void DlgSettingsSelection::saveSettings() void DlgSettingsSelection::loadSettings() { + ui->checkBoxPreselection->onRestore(); + ui->checkBoxSelection->onRestore(); + ui->HighlightColor->onRestore(); + ui->SelectionColor->onRestore(); ui->spinPickRadius->onRestore(); auto handle = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/TreeView"); ui->checkBoxAutoSwitch->setChecked(handle->GetBool("SyncView", true)); diff --git a/src/Gui/DlgSettingsSelection.ui b/src/Gui/DlgSettingsSelection.ui index 22541a9de0..6c11c35fbb 100644 --- a/src/Gui/DlgSettingsSelection.ui +++ b/src/Gui/DlgSettingsSelection.ui @@ -13,15 +13,131 @@ Selection - + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + - + + + + 240 + 0 + + + + Enable preselection, highlighted with specified color + - Pick radius (px): + Enable preselection + + + true + + + EnablePreselection + + + View + + + + + + + 225 + 225 + 20 + + + + HighlightColor + + + View + + + + + + + Enable selection, highlighted with specified color + + + Enable selection + + + true + + + EnableSelection + + + View + + + + + + + + + + + 28 + 173 + 28 + + + + SelectionColor + + + View + + + + + + + + + Pick radius (px): + + + + + + + Qt::Horizontal + + + + 250 + 10 + + + + + + + @@ -57,42 +173,42 @@ Larger value eases to pick things, but can make small features impossible to sel - + Auto switch to the 3D view containing the selected item - + Auto expand tree item when the corresponding object is selected in 3D view - + Preselect the object in 3D view when mouse over the tree item - + Record selection in tree view in order to go back/forward using navigation button - + Add checkboxes for selection in document tree - + Qt::Vertical @@ -113,7 +229,35 @@ Larger value eases to pick things, but can make small features impossible to sel QDoubleSpinBox
Gui/PrefWidgets.h
+ + Gui::ColorButton + QPushButton +
Gui/Widgets.h
+
+ + Gui::PrefColorButton + Gui::ColorButton +
Gui/PrefWidgets.h
+
+ + Gui::PrefCheckBox + QCheckBox +
Gui/PrefWidgets.h
+
- + + + checkBoxPreselection + toggled(bool) + HighlightColor + setEnabled(bool) + + + checkBoxSelection + toggled(bool) + SelectionColor + setEnabled(bool) + + diff --git a/src/Gui/DlgSettingsViewColor.cpp b/src/Gui/DlgSettingsViewColor.cpp index 19d781ae33..e00418a56b 100644 --- a/src/Gui/DlgSettingsViewColor.cpp +++ b/src/Gui/DlgSettingsViewColor.cpp @@ -42,8 +42,6 @@ DlgSettingsViewColor::DlgSettingsViewColor(QWidget* parent) , ui(new Ui_DlgSettingsViewColor) { ui->setupUi(this); - ui->HighlightColor->setEnabled(ui->checkBoxPreselection->isChecked()); - ui->SelectionColor->setEnabled(ui->checkBoxSelection->isChecked()); connect(ui->SwitchGradientColors, &QPushButton::pressed, this, &DlgSettingsViewColor::onSwitchGradientColorsPressed); @@ -78,10 +76,6 @@ void DlgSettingsViewColor::saveSettings() ui->radioButtonGradient->onSave(); ui->rbRadialGradient->onSave(); ui->checkMidColor->onSave(); - ui->checkBoxPreselection->onSave(); - ui->checkBoxSelection->onSave(); - ui->HighlightColor->onSave(); - ui->SelectionColor->onSave(); ui->TreeEditColor->onSave(); ui->TreeActiveColor->onSave(); } @@ -96,10 +90,6 @@ void DlgSettingsViewColor::loadSettings() ui->radioButtonGradient->onRestore(); ui->rbRadialGradient->onRestore(); ui->checkMidColor->onRestore(); - ui->checkBoxPreselection->onRestore(); - ui->checkBoxSelection->onRestore(); - ui->HighlightColor->onRestore(); - ui->SelectionColor->onRestore(); ui->TreeEditColor->onRestore(); ui->TreeActiveColor->onRestore(); diff --git a/src/Gui/DlgSettingsViewColor.ui b/src/Gui/DlgSettingsViewColor.ui index 5e493a6a65..d3bc9309e0 100644 --- a/src/Gui/DlgSettingsViewColor.ui +++ b/src/Gui/DlgSettingsViewColor.ui @@ -14,158 +14,6 @@ Colors
- - - - Selection - - - - 9 - - - 9 - - - 9 - - - 9 - - - 6 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 6 - - - - - - 240 - 0 - - - - Enable preselection and highlight by specified color - - - Enable preselection highlighting - - - true - - - EnablePreselection - - - View - - - - - - - false - - - - 0 - 0 - - - - - - - - 225 - 225 - 20 - - - - HighlightColor - - - View - - - - - - - Enable selection highlighting and use specified color - - - Enable selection highlighting - - - true - - - EnableSelection - - - View - - - - - - - false - - - - - - - 28 - 173 - 28 - - - - SelectionColor - - - View - - - - - - - - - Qt::Horizontal - - - - 183 - 23 - - - - - - - @@ -607,38 +455,5 @@ backgroundColorMid - - - checkBoxPreselection - toggled(bool) - HighlightColor - setEnabled(bool) - - - 70 - 45 - - - 310 - 54 - - - - - checkBoxSelection - toggled(bool) - SelectionColor - setEnabled(bool) - - - 158 - 76 - - - 291 - 75 - - - - +