From e08af8e6291b942f4ebd5c3a79db721ab3b3e066 Mon Sep 17 00:00:00 2001 From: Pawel Andruszkiewicz Date: Thu, 20 Oct 2016 11:14:11 +0200 Subject: [PATCH] EFL requires the color to be pre-multiplied Change-Id: I7dc8711c404f8c095c9342a6384195cb2587938f Signed-off-by: Pawel Andruszkiewicz --- src/ElmSharp/ElmSharp/Widget.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ElmSharp/ElmSharp/Widget.cs b/src/ElmSharp/ElmSharp/Widget.cs index 38b88cc..71962e1 100644 --- a/src/ElmSharp/ElmSharp/Widget.cs +++ b/src/ElmSharp/ElmSharp/Widget.cs @@ -121,7 +121,10 @@ namespace ElmSharp public void SetPartColor(string part, Color color) { - Interop.Elementary.elm_object_color_class_color_set(Handle, part, color.R, color.G, color.B, color.A); + Interop.Elementary.elm_object_color_class_color_set(Handle, part, color.R * color.A / 255, + color.G * color.A / 255, + color.B * color.A / 255, + color.A); } internal IntPtr GetPartContent(string part) -- 2.7.4