From 4de0e6fb198a60bd09400d64994e7aa8308b1e23 Mon Sep 17 00:00:00 2001 From: Uwe Date: Sun, 10 Jul 2022 02:20:58 +0200 Subject: [PATCH] Revert "[Gui] preferences: add button to switch gradient colors" This reverts commit 25ffc89063de999ab71be5282e92cf553c9e7bd6. --- src/Gui/DlgSettingsViewColor.cpp | 12 ---- src/Gui/DlgSettingsViewColor.h | 3 - src/Gui/DlgSettingsViewColor.ui | 97 ++++++++++++++++++-------------- 3 files changed, 55 insertions(+), 57 deletions(-) diff --git a/src/Gui/DlgSettingsViewColor.cpp b/src/Gui/DlgSettingsViewColor.cpp index 0ecc2c8a13..748559953d 100644 --- a/src/Gui/DlgSettingsViewColor.cpp +++ b/src/Gui/DlgSettingsViewColor.cpp @@ -22,10 +22,6 @@ #include "PreCompiled.h" -#ifndef _PreComp_ -#include -#endif - #include "DlgSettingsViewColor.h" #include "ui_DlgSettingsViewColor.h" @@ -45,7 +41,6 @@ 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); } /** @@ -103,12 +98,5 @@ void DlgSettingsViewColor::changeEvent(QEvent *e) } } -void DlgSettingsViewColor::onSwitchGradientColorsPressed() -{ - QColor tempColor = ui->backgroundColorFrom->color(); - ui->backgroundColorFrom->setColor(ui->backgroundColorTo->color()); - ui->backgroundColorTo->setColor(tempColor); -} - #include "moc_DlgSettingsViewColor.cpp" diff --git a/src/Gui/DlgSettingsViewColor.h b/src/Gui/DlgSettingsViewColor.h index 9f0b8c12d0..f3b52ec8d3 100644 --- a/src/Gui/DlgSettingsViewColor.h +++ b/src/Gui/DlgSettingsViewColor.h @@ -50,9 +50,6 @@ public: protected: void changeEvent(QEvent *e); -protected Q_SLOTS: - void onSwitchGradientColorsPressed(); - private: std::unique_ptr ui; }; diff --git a/src/Gui/DlgSettingsViewColor.ui b/src/Gui/DlgSettingsViewColor.ui index 75b851b83b..a6e28a6e25 100644 --- a/src/Gui/DlgSettingsViewColor.ui +++ b/src/Gui/DlgSettingsViewColor.ui @@ -6,15 +6,30 @@ 0 0 - 405 - 400 + 601 + 598 Colors - - + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + Selection @@ -91,7 +106,7 @@ - + 225 225 @@ -125,7 +140,7 @@ - + false @@ -133,7 +148,7 @@ - + 28 173 @@ -148,9 +163,9 @@ - + - + Qt::Horizontal @@ -163,10 +178,10 @@ - + - + Background color for the model view @@ -229,7 +244,7 @@ - + false @@ -246,7 +261,7 @@ - + 20 20 @@ -280,7 +295,7 @@ - + Top color @@ -288,7 +303,7 @@ - + 51 51 @@ -303,30 +318,23 @@ - - - - Switches the colors of the gradient - - - Switch - - - - + Qt::Horizontal + + QSizePolicy::Minimum + - 40 + 171 20 - + Bottom color @@ -334,7 +342,7 @@ - + 151 151 @@ -349,7 +357,7 @@ - + Color gradient will get selected color as middle color @@ -365,7 +373,7 @@ - + false @@ -376,7 +384,7 @@ - + 111 111 @@ -391,9 +399,9 @@ - + - + Qt::Horizontal @@ -406,10 +414,10 @@ - + - + Tree view @@ -474,7 +482,7 @@ Background color for objects in tree view that are currently edited - + 255 255 @@ -507,7 +515,7 @@ Background color for active containers in tree view - + 230 230 @@ -524,7 +532,7 @@ - + Qt::Horizontal @@ -537,10 +545,10 @@ - + - + Qt::Vertical @@ -548,7 +556,7 @@ 20 - 20 + 40 @@ -576,6 +584,11 @@ QCheckBox
Gui/PrefWidgets.h
+ + Gui::PrefDoubleSpinBox + QDoubleSpinBox +
Gui/PrefWidgets.h
+
checkBoxPreselection