From a469aa111546896ea73a32f247105eee507fd966 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 16 Jun 2015 14:54:36 +0300 Subject: Add support for labels inside userpalette. Add being colors label to userpalette. --- src/gui/widgets/tabs/setup_colors.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/gui/widgets') 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); -- cgit v1.2.3-70-g09d2