[TIZENIOT-1903] fixed volume popup sliding issue 96/245396/1 submit/tizen/20201008.085909 submit/tizen_6.0/20201029.205504 submit/tizen_6.0_hotfix/20201102.192904 submit/tizen_6.0_hotfix/20201103.115104 tizen_6.0_src.m2_release
authoraman.jeph <aman.jeph@samsung.com>
Thu, 8 Oct 2020 06:46:10 +0000 (12:16 +0530)
committeraman.jeph <aman.jeph@samsung.com>
Thu, 8 Oct 2020 06:46:10 +0000 (12:16 +0530)
Change-Id: Ic3f20233d3f446a6d50e3547c30970b658d49d61
Signed-off-by: aman.jeph <aman.jeph@samsung.com>
Build/flags.mk
playview/src/widget/vp-play-volume.c
src/widget/mp-video-list-auto-play-ctrl.c
vp-main/Build/flags.mk

index 1f3c7f8147a92ccfb2d95b55cf1681554bdd002f..0eb7e41914df20bd26e7224070a48a94f6b8a838 100755 (executable)
@@ -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"
index 1572982b919e56b4575e0e7e934c1231f3056902..6cf893fcd3e3a6453d3873b089e352c9d37c5a51 100755 (executable)
 
 #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;
index 7c49871577cad745b92540878d4b623f4d068b77..3f3157b1872aa641f52b0351455b86bb0785dff7 100755 (executable)
@@ -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");
index 1f3c7f8147a92ccfb2d95b55cf1681554bdd002f..0eb7e41914df20bd26e7224070a48a94f6b8a838 100755 (executable)
@@ -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"