From: aman.jeph Date: Tue, 9 Feb 2021 05:00:18 +0000 (+0530) Subject: Fixed playspeed background and language translation for tabs X-Git-Tag: submit/tizen/20210209.094606^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F46%2F253346%2F1;p=profile%2Fiot%2Fapps%2Fnative%2Fvideo-player.git Fixed playspeed background and language translation for tabs Change-Id: I37762605ece6ed4b29da71659e05b54247c62a11 Signed-off-by: aman.jeph --- diff --git a/playview/src/vp-play-view.c b/playview/src/vp-play-view.c index 52fe757..a7e7806 100755 --- a/playview/src/vp-play-view.c +++ b/playview/src/vp-play-view.c @@ -1992,7 +1992,7 @@ bool vp_play_view_realize(play_view_handle pViewHandle) if(pPlayView->stream_info == NULL) { vp_sound_init_session(pViewHandle); } - + // Only capture the audio stream on resume when player was in play state before pause. if (!vp_play_normal_view_is_audio_only(pPlayView) && manual_paused == FALSE) { sound_stream_focus_state_e state_for_playback; sound_stream_focus_state_e state_for_recording; diff --git a/src/view/mp-video-list-view-main.c b/src/view/mp-video-list-view-main.c index 9788d12..dac1c64 100755 --- a/src/view/mp-video-list-view-main.c +++ b/src/view/mp-video-list-view-main.c @@ -65,8 +65,8 @@ -#define TOOLBAR_BUTTON_VIDEOS "Videos" -#define TOOLBAR_BUTTOn_FOLDERS "Folders" +#define TOOLBAR_BUTTON_VIDEOS VIDEOS_VIEWASOPT_OPT_THUMBNAIL +#define TOOLBAR_BUTTOn_FOLDERS VIDEOS_TITLE_OPT_FOLDER static st_VideoListViewMainViewHandle *g_pMainViewHandle = NULL; static st_VideoListViewMainViewWidget *g_pMainViewWidget = NULL; @@ -1277,6 +1277,12 @@ toolbar_folders_item_cb(void *data, Evas_Object *obj, void *event_info) LIST_UPDATE_TYPE_ALL, __mp_list_view_result_user_cb); } +static void _tolbar_language_changed(void *data, Evas_Object *obj, void *event_info) +{ + elm_object_item_part_text_set(g_pToolbarItemData.videos_item, "elm.text", TOOLBAR_BUTTON_VIDEOS); + elm_object_item_part_text_set(g_pToolbarItemData.folders_item, "elm.text", TOOLBAR_BUTTOn_FOLDERS); +} + Evas_Object* mp_list_view_create_toolbar(Evas_Object* naviframe) { Evas_Object *toolbar; @@ -1288,6 +1294,8 @@ Evas_Object* mp_list_view_create_toolbar(Evas_Object* naviframe) elm_toolbar_transverse_expanded_set(toolbar, EINA_TRUE); elm_toolbar_select_mode_set(toolbar, ELM_OBJECT_SELECT_MODE_ALWAYS); + evas_object_smart_callback_add(toolbar, "language,changed", _tolbar_language_changed, NULL); + g_pToolbarItemData.videos_item = elm_toolbar_item_append(toolbar, NULL, TOOLBAR_BUTTON_VIDEOS, toolbar_videos_item_cb, NULL); g_pToolbarItemData.folders_item = elm_toolbar_item_append(toolbar, NULL, TOOLBAR_BUTTOn_FOLDERS, toolbar_folders_item_cb, NULL); diff --git a/vp-main/res/edje/images/play_speed_bg.png b/vp-main/res/edje/images/play_speed_bg.png new file mode 100755 index 0000000..dcb9d36 Binary files /dev/null and b/vp-main/res/edje/images/play_speed_bg.png differ diff --git a/vp-main/res/edje/pv-normal-main.edc b/vp-main/res/edje/pv-normal-main.edc index 4ab6311..735464a 100755 --- a/vp-main/res/edje/pv-normal-main.edc +++ b/vp-main/res/edje/pv-normal-main.edc @@ -39,6 +39,10 @@ externals { external: "feedback"; } +images { + image: "play_speed_bg.png" COMP; +} + collections { base_scale: CURRENT_BASE_SCALE; plugins { @@ -639,19 +643,22 @@ collections { part { name: "pv.normal.main.playingspeed.rect"; - type: RECT; + type: IMAGE; mouse_events: 1; repeat_events : 1; scale: 1; description { state: "default" 0.0; visible: 0; - min: 100 25; + min: 80 80; + max: 80 80; fixed: 1 1; align: 0.5 1.0; - rel1 { relative: 0.4 0.0; to_y : "pv.normal.main.control"; offset : 0 -20; } - rel2 { relative: 0.6 0.0; to_y : "pv.normal.main.control"; offset : 0 -20; } - color: 0 0 0 102; + rel1 { to: "pv.normal.main.control"; relative: 0.0 0.0; } + rel2 { to: "pv.normal.main.control"; relative: 1.0 0.0; offset: 0 -10; } + image { + normal: "play_speed_bg.png"; + } } description { state: "show" 0.0; @@ -668,7 +675,7 @@ collections { description { state: "default" 0.0; visible: 0; - align: 0.0 0.0; + align: 0.5 0.5; rel1 { relative: 0.0 0.0; to : "pv.normal.main.playingspeed.rect";} rel2 { relative: 1.0 1.0; to : "pv.normal.main.playingspeed.rect";} color: FONT_COLOR;