Fixed TSAM-8866 Rotation color stability 52/93452/2
authorbhutani.92 <bhutani.92@samsung.com>
Mon, 24 Oct 2016 10:12:18 +0000 (15:42 +0530)
committerbhutani.92 <bhutani.92@samsung.com>
Mon, 24 Oct 2016 10:14:24 +0000 (15:44 +0530)
Change-Id: If7e71b7ced168c2d51f1edebf90504d5cc0d0641
Signed-off-by: bhutani.92 <bhutani.92@samsung.com>
playview/res/edje/pv-subtitle-color-popup.edc
playview/src/feature/vp-subtitle-color.c

index e07fc32..b366cc2 100644 (file)
 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;
index 74f8f9a..0df6cf8 100644 (file)
@@ -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 = "<color=%s>%s</color>";
+       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 = "<color=%s>%s</color>";
+               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;