From 5a8a0bb9f257e43de35ad7f5634b5d678938dd5b Mon Sep 17 00:00:00 2001 From: "aman.jeph" Date: Thu, 8 Oct 2020 12:16:10 +0530 Subject: [PATCH] [TIZENIOT-1903] fixed volume popup sliding issue Change-Id: Ic3f20233d3f446a6d50e3547c30970b658d49d61 Signed-off-by: aman.jeph --- Build/flags.mk | 35 ++++++++++---- playview/src/widget/vp-play-volume.c | 57 ++++------------------- src/widget/mp-video-list-auto-play-ctrl.c | 6 +-- vp-main/Build/flags.mk | 35 ++++++++++---- 4 files changed, 65 insertions(+), 68 deletions(-) diff --git a/Build/flags.mk b/Build/flags.mk index 1f3c7f8..0eb7e41 100755 --- a/Build/flags.mk +++ b/Build/flags.mk @@ -1,16 +1,35 @@ +# Add tools flags defines -DEBUG_OP = -g3 -CPP_DEBUG_OP = +ifeq ($(strip $(BUILD_CONFIG)),Debug) +OPTIMIZATION_OP := -O0 +DEBUG_OP := -g3 -D_DEBUG +CPP_OPTIMIZATION_OP := -O0 +CPP_DEBUG_OP := -g3 -D_DEBUG +LINK_OP := +else +ifeq ($(strip $(BUILD_CONFIG)),Release) +OPTIMIZATION_OP := -O3 +DEBUG_OP := +CPP_OPTIMIZATION_OP := -O3 +CPP_DEBUG_OP := +LINK_OP := -s +endif +endif -OPTIMIZATION_OP = -O0 -CPP_OPTIMIZATION_OP = +ifeq ($(STRIP_INFO),off) +LINK_OP := +else +ifeq ($(STRIP_INFO),on) +LINK_OP := -s +endif +endif -COMPILE_FLAGS = $(DEBUG_OP) $(OPTIMIZATION_OP) -Wall -c -fmessage-length=0 -fPIC +COMPILE_FLAGS = $(DEBUG_OP) $(OPTIMIZATION_OP) -Wall -c -fmessage-length=0 -CPP_COMPILE_FLAGS = $(CPP_DEBUG_OP) $(CPP_OPTIMIZATION_OP) +CPP_COMPILE_FLAGS = $(CPP_DEBUG_OP) $(CPP_OPTIMIZATION_OP) -Wall -c -fmessage-length=0 -std=c++11 -LINK_FLAGS = -shared -Wl,--no-undefined +LINK_FLAGS = -L"$(PROJ_PATH)/lib" -Wl,--no-undefined $(LINK_OP) AR_FLAGS = -EDC_COMPILE_FLAGS = \ No newline at end of file +EDC_COMPILE_FLAGS = -id "$(PROJ_PATH)/edje/images" -sd "$(PROJ_PATH)/edje/sounds" -fd "$(PROJ_PATH)/edje/fonts" diff --git a/playview/src/widget/vp-play-volume.c b/playview/src/widget/vp-play-volume.c index 1572982..6cf893f 100755 --- a/playview/src/widget/vp-play-volume.c +++ b/playview/src/widget/vp-play-volume.c @@ -27,15 +27,11 @@ #define VP_VOLUME_HIDE_LAYOUT_TIMER_INTERVAL 5.0 -#define VP_VOLUME_PORTRAIT_POS_X 15 -#define VP_VOLUME_PORTRAIT_POS_Y 60 -#define VP_VOLUME_PORTRAIT_HEIGHT 241 +#define VP_VOLUME_POPUP_Y 108 // position of volume popup with respect to window +#define VP_VOLUME_POPUP_PROGRESS_BAR_HEIGHT 360 //actual height of progress bar inside the volume popup layout -#define VP_VOLUME_LANDSCAPE_POS_X 19 -#define VP_VOLUME_LANDSCAPE_POS_Y 27 -#define VP_VOLUME_LANDSCAPE_HEIGHT 170 - -#define VP_VOLUME_TOP_PADDING_H 87 +#define VP_VOLUME_TOP_PADDING 40 // top padding between popup layout and progress bar +#define VP_VOLUME_PROGRESS_POINT_HALF_SIZE 12 // mid of progress bar center point #define VP_VOLUME_TEXT_MAX_LEN 4 @@ -279,7 +275,7 @@ static void _vp_play_volume_destory_handle(VolumeWidget * pVolumeWidget) * @return */ static double _vp_play_volume_get_mouse_pos_ratio(Evas_Object * pObj, - bool bLandscape, + bool bLandscape EINA_UNUSED, int nCurY, Evas_Object * pWin) { @@ -291,47 +287,10 @@ static double _vp_play_volume_get_mouse_pos_ratio(Evas_Object * pObj, int nHeight = 0; int nCurrent = 0; double dRatio = 0.0; - int w = 0; - int h = 0; - elm_win_screen_size_get(pWin, NULL, NULL, &w, &h); - if ((elm_config_scale_get() - 2.6) == 0.0) { - if (bLandscape) { - nHeight = VP_VOLUME_LANDSCAPE_HEIGHT; - nCurrent = - nCurY - VP_VOLUME_LANDSCAPE_POS_Y - - VP_VOLUME_TOP_PADDING_H + 10; - } else { - nHeight = 350; - nCurrent = - nCurY - VP_VOLUME_PORTRAIT_POS_Y - - VP_VOLUME_TOP_PADDING_H - 310; - } - } else if ((elm_config_scale_get() - 1.8) == 0.0) { - if (bLandscape) { - nHeight = 125; - nCurrent = - nCurY - VP_VOLUME_LANDSCAPE_POS_Y - - VP_VOLUME_TOP_PADDING_H + 70; - } else { - nHeight = 255; - nCurrent = - nCurY - VP_VOLUME_PORTRAIT_POS_Y - - VP_VOLUME_TOP_PADDING_H - 42; - } - } else { - if (bLandscape) { - nHeight = VP_VOLUME_LANDSCAPE_HEIGHT; - nCurrent = - nCurY - VP_VOLUME_LANDSCAPE_POS_Y - - VP_VOLUME_TOP_PADDING_H + 10; - } else { - nHeight = 390; - nCurrent = - nCurY - VP_VOLUME_PORTRAIT_POS_Y - - VP_VOLUME_TOP_PADDING_H - 150; - } - } + // we calculate the ratio by mouse pointer current position in regard of volume popup + nHeight = VP_VOLUME_POPUP_PROGRESS_BAR_HEIGHT; + nCurrent = nCurY - VP_VOLUME_POPUP_Y - VP_VOLUME_TOP_PADDING - VP_VOLUME_PROGRESS_POINT_HALF_SIZE; if (nCurrent < 0) { nCurrent = 0; diff --git a/src/widget/mp-video-list-auto-play-ctrl.c b/src/widget/mp-video-list-auto-play-ctrl.c index 7c49871..3f3157b 100755 --- a/src/widget/mp-video-list-auto-play-ctrl.c +++ b/src/widget/mp-video-list-auto-play-ctrl.c @@ -261,14 +261,14 @@ static void __mp_auto_play_ctrl_select_item_cb(void *pUserData, nIndex = (int) elm_object_item_data_get(pItem); VideoLogError("====================nindex=%d", nIndex); if (nIndex == 1) { - VideoLogError("====================vp_set_auto_play=%true"); + VideoLogError("====================vp_set_auto_play=true"); vp_set_auto_play(true); } else { - VideoLogError("====================vp_set_auto_play=%false"); + VideoLogError("====================vp_set_auto_play=false"); vp_set_auto_play(false); } if (vp_is_auto_play_on()) { - VideoLogError("====================found vp_set_auto_play=%true"); + VideoLogError("====================found vp_set_auto_play=true"); } if (nIndex == g_pAutoPlayHandle->nAutoPlaySelect) { VideoLogInfo("Current state"); diff --git a/vp-main/Build/flags.mk b/vp-main/Build/flags.mk index 1f3c7f8..0eb7e41 100755 --- a/vp-main/Build/flags.mk +++ b/vp-main/Build/flags.mk @@ -1,16 +1,35 @@ +# Add tools flags defines -DEBUG_OP = -g3 -CPP_DEBUG_OP = +ifeq ($(strip $(BUILD_CONFIG)),Debug) +OPTIMIZATION_OP := -O0 +DEBUG_OP := -g3 -D_DEBUG +CPP_OPTIMIZATION_OP := -O0 +CPP_DEBUG_OP := -g3 -D_DEBUG +LINK_OP := +else +ifeq ($(strip $(BUILD_CONFIG)),Release) +OPTIMIZATION_OP := -O3 +DEBUG_OP := +CPP_OPTIMIZATION_OP := -O3 +CPP_DEBUG_OP := +LINK_OP := -s +endif +endif -OPTIMIZATION_OP = -O0 -CPP_OPTIMIZATION_OP = +ifeq ($(STRIP_INFO),off) +LINK_OP := +else +ifeq ($(STRIP_INFO),on) +LINK_OP := -s +endif +endif -COMPILE_FLAGS = $(DEBUG_OP) $(OPTIMIZATION_OP) -Wall -c -fmessage-length=0 -fPIC +COMPILE_FLAGS = $(DEBUG_OP) $(OPTIMIZATION_OP) -Wall -c -fmessage-length=0 -CPP_COMPILE_FLAGS = $(CPP_DEBUG_OP) $(CPP_OPTIMIZATION_OP) +CPP_COMPILE_FLAGS = $(CPP_DEBUG_OP) $(CPP_OPTIMIZATION_OP) -Wall -c -fmessage-length=0 -std=c++11 -LINK_FLAGS = -shared -Wl,--no-undefined +LINK_FLAGS = -L"$(PROJ_PATH)/lib" -Wl,--no-undefined $(LINK_OP) AR_FLAGS = -EDC_COMPILE_FLAGS = \ No newline at end of file +EDC_COMPILE_FLAGS = -id "$(PROJ_PATH)/edje/images" -sd "$(PROJ_PATH)/edje/sounds" -fd "$(PROJ_PATH)/edje/fonts" -- 2.34.1