}
}
part {
+ name: "elm.swallow.content_bg";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 0.0;
+ align: 0.0 0.0;
+ min: 440 210;
+ fixed: 1 1;
+ }
+ }
+ part {
name: "elm.swallow.content";
type: SWALLOW;
scale: 1;
}
}
part {
+ name: "elm.swallow.text_bg";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1.relative: 0.0 1.0;
+ rel2.relative: 1.0 1.0;
+ min: 440 82;
+ align: 0.0 1.0;
+ fixed: 1 1;
+ }
+ }
+ part {
name: "content.border_top";
type: RECT;
mouse_events: 0;
}
}
part {
- name: "text.bg";
+ name: "content.border_bottom";
type: RECT;
+ mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
- rel1.relative: 0.0 1.0;
- rel2.relative: 1.0 1.0;
- min: 440 82;
- align: 0.0 1.0;
- color: 100 100 100 255;
+ rel1 {
+ to: "elm.swallow.content";
+ relative: 0.0 1.0;
+ }
+ align: 0.0 0.0;
+ color: 0 119 246 255;
fixed: 1 1;
+ visible: 0;
}
description {
state: "focused" 0.0;
inherit: "default" 0.0;
- color: 0 119 246 255;
+ visible: 1;
}
}
part {
description {
state: "default" 0.0;
rel1 {
- to: "text.bg";
+ to: "elm.swallow.text_bg";
relative: 0.5 0.5;
}
rel2 {
- to: "text.bg";
+ to: "elm.swallow.text_bg";
relative: 0.5 0.5;
}
text {
target: "content.border_top";
target: "content.border_left";
target: "content.border_right";
- target: "text.bg";
+ target: "content.border_bottom";
}
program {
name: "go_passive";
target: "content.border_top";
target: "content.border_left";
target: "content.border_right";
- target: "text.bg";
+ target: "content.border_bottom";
}
program {
name, "mouse_unclick_after";
#define PART_ICON_1_FOCUSED "elm.swallow.icon.1.focus"
#define PART_ICON_1_SELECTED "elm.swallow.icon.1.select"
#define PART_ICON_1_DISABLED "elm.swallow.icon.1.disable"
+#define PART_TEXT_BG "elm.swallow.text_bg"
+#define PART_CONTENT_BG "elm.swallow.content_bg"
#define SOURCE_PROGRAM "program"
#define SOURCE_ELM "elm"
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);
#include <app_control.h>
#include <app_debug.h>
#include <app_define.h>
+#include <app_contents.h>
#include "define.h"
#include "util.h"
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;
}
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);