summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-23 23:03:27 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-23 23:03:27 +0300
commit49fff1aed195d44871caeeff063b1b8c76628e02 (patch)
tree5a2d8a617c089a1e8b6c50daa05ee32cb7c5ec90 /src/gui
parent9c9a1a4a4e2af42246f56aa73a5212ece9af9493 (diff)
downloadplus-49fff1aed195d44871caeeff063b1b8c76628e02.tar.gz
plus-49fff1aed195d44871caeeff063b1b8c76628e02.tar.bz2
plus-49fff1aed195d44871caeeff063b1b8c76628e02.tar.xz
plus-49fff1aed195d44871caeeff063b1b8c76628e02.zip
Remove default parameter from color.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/color.h2
-rw-r--r--src/gui/palette.cpp16
-rw-r--r--src/gui/theme.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp13
4 files changed, 17 insertions, 16 deletions
diff --git a/src/gui/color.h b/src/gui/color.h
index c4a1aab01..71f688fda 100644
--- a/src/gui/color.h
+++ b/src/gui/color.h
@@ -118,7 +118,7 @@ class Color final
constexpr Color(const unsigned int ar,
const unsigned int ag,
const unsigned int ab,
- const unsigned int aa = 255) :
+ const unsigned int aa) :
r(ar),
g(ag),
b(ab),
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp
index 7fcf153fe..6a24a03b3 100644
--- a/src/gui/palette.cpp
+++ b/src/gui/palette.cpp
@@ -32,18 +32,18 @@
#include "debug.h"
-const Color Palette::BLACK = Color(0, 0, 0);
+const Color Palette::BLACK = Color(0, 0, 0, 255);
Palette::Palettes Palette::mInstances;
const Color Palette::RAINBOW_COLORS[7] =
{
- Color(255, 0, 0),
- Color(255, 153, 0),
- Color(255, 255, 0),
- Color(0, 153, 0),
- Color(0, 204, 204),
- Color(51, 0, 153),
- Color(153, 0, 153)
+ Color(255, 0, 0, 255),
+ Color(255, 153, 0, 255),
+ Color(255, 255, 0, 255),
+ Color(0, 153, 0, 255),
+ Color(0, 204, 204, 255),
+ Color(51, 0, 153, 255),
+ Color(153, 0, 153, 255)
};
const int Palette::RAINBOW_COLOR_COUNT = 7;
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index cbc0d654c..6d9c572ba 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -172,7 +172,7 @@ Color Theme::getProgressColor(const ProgressColorIdT type,
}
}
- return Color(color[0], color[1], color[2]);
+ return Color(color[0], color[1], color[2], 255U);
}
Skin *Theme::load(const std::string &filename,
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index 224bc9799..f6f8dc386 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -477,15 +477,16 @@ void Setup_Colors::updateColor() const
if (grad == GradientType::STATIC)
{
userPalette->setColor(type,
- CAST_S32(mRedSlider->getValue()),
- CAST_S32(mGreenSlider->getValue()),
- CAST_S32(mBlueSlider->getValue()));
+ CAST_S32(mRedSlider->getValue()),
+ CAST_S32(mGreenSlider->getValue()),
+ CAST_S32(mBlueSlider->getValue()));
}
else if (grad == GradientType::PULSE)
{
userPalette->setTestColor(type, Color(
- CAST_S32(mRedSlider->getValue()),
- CAST_S32(mGreenSlider->getValue()),
- CAST_S32(mBlueSlider->getValue())));
+ CAST_S32(mRedSlider->getValue()),
+ CAST_S32(mGreenSlider->getValue()),
+ CAST_S32(mBlueSlider->getValue()),
+ 255U));
}
}