From 411d4107b79c8cedece711d31cf2a80cfc0f9b7a Mon Sep 17 00:00:00 2001 From: "bhutani.92" Date: Mon, 24 Oct 2016 15:42:18 +0530 Subject: [PATCH] Fixed TSAM-8866 Rotation color stability Change-Id: If7e71b7ced168c2d51f1edebf90504d5cc0d0641 Signed-off-by: bhutani.92 --- playview/res/edje/pv-subtitle-color-popup.edc | 10 +++++++++- playview/src/feature/vp-subtitle-color.c | 19 +++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/playview/res/edje/pv-subtitle-color-popup.edc b/playview/res/edje/pv-subtitle-color-popup.edc index e07fc32..b366cc2 100644 --- a/playview/res/edje/pv-subtitle-color-popup.edc +++ b/playview/res/edje/pv-subtitle-color-popup.edc @@ -20,6 +20,13 @@ collections { group { name: "pv.subtitle-color-popup"; + styles { + style { name: "caption_style"; + base: "font=Tizen:style=Regular align=center font_size=16 color=#FFFFFF"; + tag: "br" "\n"; + tag: "tab" "\t"; + } + } parts{ part { name: "pv.subtitle-color-popup.main.bg"; @@ -60,7 +67,7 @@ collections { } part { name: "pv.subtitle-color-popup.subject"; - type: TEXT; + type: TEXTBLOCK; scale: 1; description { state: "default" 0.0; @@ -70,6 +77,7 @@ collections { rel2 { relative: 1.0 1.0; offset: SUBTITLE_TEXT_OFFSET 0; to: "pv.subtitle-color-group.text.bg";} align: 0.0 0.0; text { + style: "caption_style"; align: 0.5 0.5; min: 0 1; size: 16; diff --git a/playview/src/feature/vp-subtitle-color.c b/playview/src/feature/vp-subtitle-color.c index 74f8f9a..0df6cf8 100644 --- a/playview/src/feature/vp-subtitle-color.c +++ b/playview/src/feature/vp-subtitle-color.c @@ -627,8 +627,9 @@ static void _vp_play_subtitle_color_popup_colorpalette_cb(void *data, pSubtitleColor->pCurrentColorHex = vp_play_util_convert_rgba_to_hex(r, g, b, a); - Evas_Object* sub = (Evas_Object*) edje_object_part_object_get(_EDJ(cp->layout), "pv.subtitle-color-popup.subject"); - evas_object_color_set(sub, r, g, b, a); + char *color_fmt = "%s"; + char *caption_txt = g_strdup_printf(color_fmt, pSubtitleColor->pCurrentColorHex, VP_PLAY_STRING_PREVIEW_SUBTITLE_CC); + elm_object_part_text_set(cp->layout, "pv.subtitle-color-popup.subject", txt); //Need Free; VideoLogInfo("p = %s", pSubtitleColor->pCurrentColorHex); @@ -776,22 +777,16 @@ static Evas_Object evas_object_size_hint_align_set(pLayout, EVAS_HINT_FILL, EVAS_HINT_FILL); - Evas_Object* sub = (Evas_Object*) edje_object_part_object_get(_EDJ(pLayout), "pv.subtitle-color-popup.subject"); - if(vp_play_preference_get_subtitle_font_color_hex_key(&szColorHex) == TRUE) { vp_play_util_convert_hex_to_rgba(szColorHex, &r, &g, &b, &a); - evas_object_color_set(sub, r, g, b, 255); + char *color_fmt = "%s"; + char *caption_txt = g_strdup_printf(color_fmt, szColorHex, VP_PLAY_STRING_PREVIEW_SUBTITLE_CC); + elm_object_part_text_set(pLayout, "pv.subtitle-color-popup.subject", txt); VP_FREE(szColorHex); } - elm_object_part_text_set(pLayout, "pv.subtitle-color-popup.subject", - /*VP_PLAY_STRING_SUBTITLE_TEXT*/ VP_PLAY_STRING_PREVIEW_SUBTITLE_CC); - //elm_object_part_text_set(pLayout, - // "pv.subtitle-color-popup.opacity.text", - // VP_PLAY_STRING_SUBTITLE_OPACITY); - - + elm_object_part_text_set(pLayout, "pv.subtitle-color-popup.subject", VP_PLAY_STRING_PREVIEW_SUBTITLE_CC); evas_object_show(pLayout); return pLayout; -- 2.7.4