fix(Colors): handle correctly rgba colors

This commit is contained in:
Ronan Abhamon 2017-06-19 13:40:24 +02:00
parent 2784afb6db
commit a8bc6ad507

View file

@ -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; \
}