set different color to focused object bg 69/45869/2
authorSoohye Shin <soohye.shin@samsung.com>
Wed, 12 Aug 2015 05:54:04 +0000 (14:54 +0900)
committerSoohye Shin <soohye.shin@samsung.com>
Wed, 12 Aug 2015 05:57:57 +0000 (14:57 +0900)
Change-Id: I154feeb00eac7f3ef0505fa8f3eeacd30dd75f78
Signed-off-by: Soohye Shin <soohye.shin@samsung.com>
src/view/view_home.c
src/view/view_user.c

index 6052220..676ea45 100644 (file)
@@ -19,6 +19,7 @@
 #include <app_debug.h>
 #include <viewmgr.h>
 #include <inputmgr.h>
+#include <app_contents.h>
 
 #include "defs.h"
 #include "view.h"
@@ -26,6 +27,8 @@
 #include "datamgr.h"
 #include "utils.h"
 
+#define BUF_MAX_UID 32
+
 enum input_handler_type {
        INPUT_HANDLER_TYPE_EO,
        INPUT_HANDLER_TYPE_DOWN
@@ -211,7 +214,9 @@ static struct bar_item *_pack_bar_item(struct _priv *priv, Evas_Object *box,
                struct datamgr_item *di)
 {
        struct bar_item *bi;
+       struct color_data bright_bg;
        Evas_Object *eo, *ic, *focus_ic, *lbl, *focus_lbl, *bg;
+       char buf[BUF_MAX_UID] = {0};
 
        if (!priv || !box || !di) {
                _ERR("Invalid argument");
@@ -252,8 +257,11 @@ static struct bar_item *_pack_bar_item(struct _priv *priv, Evas_Object *box,
        if (!focus_lbl)
                goto err;
 
-       bg = utils_add_bg(eo, COLOR_DEFAULT_R, COLOR_DEFAULT_G, COLOR_DEFAULT_B,
-                       COLOR_DEFAULT_A, PART_BAR_ITEM_BG);
+       /* FIXMD: After multi user demo, it should be changed to default color */
+       snprintf(buf, sizeof(buf), "%d", getuid());
+       app_contents_get_color(buf, &bright_bg, NULL);
+       bg = utils_add_bg(eo, bright_bg.r, bright_bg.g, bright_bg.b,
+                       bright_bg.a, PART_BAR_ITEM_BG);
        if (!bg)
                goto err;
 
index 7ccbff8..70b84cc 100644 (file)
@@ -18,6 +18,7 @@
 #include <app_debug.h>
 #include <viewmgr.h>
 #include <inputmgr.h>
+#include <app_contents.h>
 
 #include "defs.h"
 #include "view.h"
@@ -25,6 +26,7 @@
 #include "datamgr.h"
 #include "utils.h"
 
+#define BUF_MAX_UID 32
 #define MESSAGE_POPUP_CONTENT "Can not add users more than 8.<br>If you want to add another user, delete one of users"
 
 enum input_handler_type {
@@ -321,7 +323,9 @@ static struct _bar_item *_pack_bar_item(struct _priv *priv, Evas_Object *box,
                struct datamgr_item *di)
 {
        struct _bar_item *bi;
+       struct color_data bright_bg;
        Evas_Object *eo, *ic, *focus_ic, *lbl, *focus_lbl, *bg;
+       char buf[BUF_MAX_UID] = {0};
 
        bi = calloc(1, sizeof(*bi));
        if (!bi) {
@@ -370,8 +374,11 @@ static struct _bar_item *_pack_bar_item(struct _priv *priv, Evas_Object *box,
        if (!strcmp(di->icon, di->focus_icon))
                elm_object_signal_emit(eo, SIG_SHOW_MASK, SRC_PROG);
 
-       bg = utils_add_bg(eo, COLOR_DEFAULT_R, COLOR_DEFAULT_G, COLOR_DEFAULT_B,
-                       COLOR_DEFAULT_A, PART_BAR_ITEM_BG);
+       /* FIXME: After multi user demo, it should be changed to default color */
+       snprintf(buf, sizeof(buf), "%d", getuid());
+       app_contents_get_color(buf, &bright_bg, NULL);
+       bg = utils_add_bg(eo, bright_bg.r, bright_bg.g, bright_bg.b,
+                       bright_bg.a, PART_BAR_ITEM_BG);
        if (!bg)
                goto err;