summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index 6581959b6..2ae5db874 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -252,6 +252,25 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED)
const Color *col = &userPalette->getColor(type);
const GradientTypeT grad = userPalette->getGradientType(type);
const int delay = userPalette->getGradientDelay(type);
+ const Visible showControls = fromBool(grad != GradientType::LABEL, Visible);
+ mPreview->setVisible(showControls);
+ mPreviewBox->setVisible(showControls);
+ mTextPreview->setVisible(showControls);
+ mGradTypeLabel->setVisible(showControls);
+ mGradTypeSlider->setVisible(showControls);
+ mGradTypeText->setVisible(showControls);
+ mGradDelayLabel->setVisible(showControls);
+ mGradDelaySlider->setVisible(showControls);
+ mGradDelayText->setVisible(showControls);
+ mRedLabel->setVisible(showControls);
+ mRedSlider->setVisible(showControls);
+ mRedText->setVisible(showControls);
+ mGreenLabel->setVisible(showControls);
+ mGreenSlider->setVisible(showControls);
+ mGreenText->setVisible(showControls);
+ mBlueLabel->setVisible(showControls);
+ mBlueSlider->setVisible(showControls);
+ mBlueText->setVisible(showControls);
mPreview->clearRows();
mPreviewBox->setContent(mTextPreview);