From a9307496c5316cf4f16fb7675dc32fb05973f4fa Mon Sep 17 00:00:00 2001 From: "jh0506.yun" Date: Tue, 11 Oct 2016 20:58:45 +0900 Subject: [PATCH] Sync elementary color class API Change-Id: Ib6faa9aa6c510fe7a59ffd83ee7ad6f411e690d1 Signed-off-by: jh0506.yun --- src/ElmSharp/ElmSharp/Widget.cs | 2 +- src/ElmSharp/Interop/Interop.Elementary.cs | 2 +- test/ElmSharp.Test/TC/ButtonTest1.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ElmSharp/ElmSharp/Widget.cs b/src/ElmSharp/ElmSharp/Widget.cs index 1bca2a0..38b88cc 100644 --- a/src/ElmSharp/ElmSharp/Widget.cs +++ b/src/ElmSharp/ElmSharp/Widget.cs @@ -121,7 +121,7 @@ namespace ElmSharp public void SetPartColor(string part, Color color) { - Interop.Elementary.elm_object_part_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.G, color.B, color.A); } internal IntPtr GetPartContent(string part) diff --git a/src/ElmSharp/Interop/Interop.Elementary.cs b/src/ElmSharp/Interop/Interop.Elementary.cs index 970e4b7..91438b7 100644 --- a/src/ElmSharp/Interop/Interop.Elementary.cs +++ b/src/ElmSharp/Interop/Interop.Elementary.cs @@ -144,7 +144,7 @@ internal static partial class Interop } [DllImport(Libraries.Elementary)] - internal static extern void elm_object_part_color_set(IntPtr obj, string part, int r, int g, int b, int a); + internal static extern void elm_object_color_class_color_set(IntPtr obj, string colorClass, int r, int g, int b, int a); [DllImport(Libraries.Elementary)] internal static extern void elm_object_part_text_set(IntPtr obj, string part, string text); diff --git a/test/ElmSharp.Test/TC/ButtonTest1.cs b/test/ElmSharp.Test/TC/ButtonTest1.cs index 377ff9a..9e655af 100644 --- a/test/ElmSharp.Test/TC/ButtonTest1.cs +++ b/test/ElmSharp.Test/TC/ButtonTest1.cs @@ -14,14 +14,14 @@ namespace ElmSharp.Test Text = "Button 1", }; - button1.SetPartColor("bg-default", Color.Red); + button1.SetPartColor("bg-normal", Color.Red); button1.Clicked += (s, e) => { Console.WriteLine("Button1 Clicked! : {0}", button1.ClassName); Console.WriteLine("Button1 Clicked! : {0}", button1.ClassName.ToLower()); Console.WriteLine("Button1 Clicked! : {0}", button1.ClassName.ToLower().Replace("_","/widget/")); - Console.WriteLine("Button1 Clicked! : {0}", button1.ClassName.ToLower().Replace("_", "/widget/")+ "/" + "bg-default"); + Console.WriteLine("Button1 Clicked! : {0}", button1.ClassName.ToLower().Replace("_", "/widget/")+ "/" + "bg-normal"); }; button1.Pressed += (s, e) => -- 2.7.4