summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjinwoo.shin <jw0227.shin@samsung.com>2015-10-01 19:58:54 +0900
committerjinwoo.shin <jw0227.shin@samsung.com>2015-10-01 19:58:54 +0900
commit381ba2929801ddd18c422ffc3200b78c11af4391 (patch)
tree801a36c25e33aa1a6198d88c7a8acfefa629cc11 /src
parent9507fb20fb50c129a4c632f3b18203dc86e5fc8b (diff)
downloadair_livetv-381ba2929801ddd18c422ffc3200b78c11af4391.tar.gz
air_livetv-381ba2929801ddd18c422ffc3200b78c11af4391.tar.bz2
air_livetv-381ba2929801ddd18c422ffc3200b78c11af4391.zip
Change-Id: I67b7ebf903d3232435de2993662355f3c5097275 Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/util.c2
-rw-r--r--src/view_action_menu.c30
2 files changed, 30 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 272c63e..888fc02 100644
--- a/src/util.c
+++ b/src/util.c
@@ -123,7 +123,7 @@ Evas_Object *util_add_icon(Evas_Object *parent, const char *file,
if (part)
elm_object_part_content_set(parent, part, ic);
- elm_image_fill_outside_set(ic, EINA_TRUE);
+ elm_image_resizable_set(ic, EINA_FALSE, EINA_TRUE);
evas_object_show(ic);
diff --git a/src/view_action_menu.c b/src/view_action_menu.c
index c998f29..b66b36c 100644
--- a/src/view_action_menu.c
+++ b/src/view_action_menu.c
@@ -20,6 +20,7 @@
#include <app_control.h>
#include <app_debug.h>
#include <app_define.h>
+#include <app_contents.h>
#include "define.h"
#include "util.h"
@@ -442,6 +443,31 @@ static void _update_channel_info(struct _priv *priv)
tv_channel_del_info(channel_info);
}
+static void _add_favorite_bg(Evas_Object *btn, char *str)
+{
+ Evas_Object *bg;
+ struct color_data bright, dark;
+
+ app_contents_get_color(str, &bright, &dark);
+ bg = evas_object_rectangle_add(btn);
+ if (!bg) {
+ _ERR("failed to add content bg");
+ return;
+ }
+ evas_object_color_set(bg, bright.r, bright.g,
+ bright.b, bright.a);
+ elm_object_part_content_set(btn, PART_CONTENT_BG, bg);
+
+ bg = evas_object_rectangle_add(btn);
+ if (!bg) {
+ _ERR("failed to add text bg");
+ return;
+ }
+ evas_object_color_set(bg, dark.r, dark.g,
+ dark.b, dark.a);
+ elm_object_part_content_set(btn, PART_TEXT_BG, bg);
+}
+
static void _update_favorite(struct _priv *priv)
{
Eina_List *channel_list, *l;
@@ -488,9 +514,11 @@ static void _update_favorite(struct _priv *priv)
}
util_add_icon(btn, IMAGE_FAVORITE_DEFAULT, PART_CONTENT);
+ _add_favorite_bg(btn, buf);
+
inputmgr_add_callback(btn, channel_info->service_id,
&favorite_handler, NULL);
- inputmgr_set_tags(btn, TAG_FAVORITE, VIEW_ACTION_MENU);
+ inputmgr_set_tags(btn, VIEW_ACTION_MENU, TAG_FAVORITE, NULL);
elm_box_pack_end(priv->favorite, btn);