summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/enums/gui/gradienttype.h20
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp5
2 files changed, 12 insertions, 13 deletions
diff --git a/src/enums/gui/gradienttype.h b/src/enums/gui/gradienttype.h
index 9ff14b4b2..fb1042aa5 100644
--- a/src/enums/gui/gradienttype.h
+++ b/src/enums/gui/gradienttype.h
@@ -24,17 +24,15 @@
#ifndef ENUMS_GUI_GRADIENTTYPE_H
#define ENUMS_GUI_GRADIENTTYPE_H
-namespace GradientType
-{
- enum T
- {
- STATIC = 0,
- PULSE,
- SPECTRUM,
- RAINBOW
- };
-} // namespace GradientType
+#include "enums/simpletypes/enumdefines.h"
-typedef GradientType::T GradientTypeT;
+enumStart(GradientType)
+{
+ STATIC = 0,
+ PULSE,
+ SPECTRUM,
+ RAINBOW
+}
+enumEnd(GradientType);
#endif // ENUMS_GUI_GRADIENTTYPE_H
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index ce567bfa7..1ba6461ea 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -354,7 +354,7 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED)
setEntry(mGreenSlider, mGreenText, col->g);
setEntry(mBlueSlider, mBlueText, col->b);
- mGradTypeSlider->setValue(grad);
+ mGradTypeSlider->setValue(static_cast<int>(grad));
updateGradType();
mGradTypeSlider->setEnabled(true);
}
@@ -382,7 +382,8 @@ void Setup_Colors::cancel()
userPalette->rollback();
const int type = userPalette->getColorTypeAt(mSelected);
const Color *const col = &userPalette->getColor(type);
- mGradTypeSlider->setValue(userPalette->getGradientType(type));
+ mGradTypeSlider->setValue(static_cast<int>(
+ userPalette->getGradientType(type)));
const int delay = userPalette->getGradientDelay(type);
setEntry(mGradDelaySlider, mGradDelayText, delay);
setEntry(mRedSlider, mRedText, col->r);