From a8bc6ad5071d1dd43289a97ba08c9d7f63036708 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 19 Jun 2017 13:40:24 +0200 Subject: [PATCH] fix(Colors): handle correctly rgba colors --- src/components/other/colors/Colors.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/other/colors/Colors.hpp b/src/components/other/colors/Colors.hpp index 7984c80bf..e59a96d68 100644 --- a/src/components/other/colors/Colors.hpp +++ b/src/components/other/colors/Colors.hpp @@ -36,11 +36,12 @@ } \ QColor m ## COLOR = VALUE; +// Alpha is in percent. #define ADD_COLOR_WITH_ALPHA(COLOR, ALPHA) \ Q_PROPERTY(QColor COLOR ## ALPHA READ get ## COLOR ## ALPHA NOTIFY colorT ## COLOR ## Changed); \ QColor get ## COLOR ## ALPHA() { \ QColor color = m ## COLOR; \ - color.setAlpha(ALPHA); \ + color.setAlpha(ALPHA * 255 / 100); \ return color; \ }