[ElmSharp] Changed Background Color property internal implementation to Widget Backgr...
authorarosis78 <35049857+arosis78@users.noreply.github.com>
Thu, 25 Jan 2018 00:44:03 +0000 (09:44 +0900)
committerGitHub <noreply@github.com>
Thu, 25 Jan 2018 00:44:03 +0000 (09:44 +0900)
Signed-off-by: Jeonghyun Yun <jh0506.yun@samsung.com>
src/ElmSharp/ElmSharp/Background.cs

index e00347a..6b140fa 100755 (executable)
@@ -43,26 +43,11 @@ namespace ElmSharp
         {
             get
             {
-                int r = 0;
-                int g = 0;
-                int b = 0;
-                int a = 0;
-                var swallowContent = GetPartContent("elm.swallow.rectangle");
-                if (swallowContent != IntPtr.Zero)
-                {
-                    Interop.Evas.evas_object_color_get(swallowContent, out r, out g, out b, out a);
-                }
-                return new Color(r, g, b, a);
+                return BackgroundColor;
             }
             set
             {
-                var swallowContent = GetPartContent("elm.swallow.rectangle");
-                if (swallowContent == IntPtr.Zero)
-                {
-                    Interop.Elementary.elm_bg_color_set(RealHandle, value.R, value.G, value.B);
-                    swallowContent = GetPartContent("elm.swallow.rectangle");
-                }
-                Interop.Evas.evas_object_color_set(swallowContent, value.R, value.G, value.B, value.A);
+                BackgroundColor = value;
             }
         }