mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
fix(Colors): handle correctly rgba colors
This commit is contained in:
parent
2784afb6db
commit
a8bc6ad507
1 changed files with 2 additions and 1 deletions
|
|
@ -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; \
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue