Added shadow to softkey 81/243981/1 submit/tizen/20200912.034247
authoraman.jeph <aman.jeph@samsung.com>
Fri, 11 Sep 2020 15:01:04 +0000 (20:31 +0530)
committeraman.jeph <aman.jeph@samsung.com>
Fri, 11 Sep 2020 15:01:04 +0000 (20:31 +0530)
Change-Id: Icb1b64e5d004de82fb628e083a759fcd18354b5c
Signed-off-by: aman.jeph <aman.jeph@samsung.com>
res/img/02_bg_softkey_active.png [changed mode: 0644->0755]
res/img/softkey_screen_reader_bg.png [new file with mode: 0755]
src/back-key.c
src/home-key.c
src/softkey-container-activate-bar.c
src/softkey-container-window.c
src/softkey-transition-effects.c
src/task-manager-key.c

old mode 100644 (file)
new mode 100755 (executable)
index f3e7c76..b063159
Binary files a/res/img/02_bg_softkey_active.png and b/res/img/02_bg_softkey_active.png differ
diff --git a/res/img/softkey_screen_reader_bg.png b/res/img/softkey_screen_reader_bg.png
new file mode 100755 (executable)
index 0000000..ea0d85e
Binary files /dev/null and b/res/img/softkey_screen_reader_bg.png differ
index c8ac897518da87b2cc705e55774d6c888586f640..585990d74d3240a57d65177ded82338e2b542467 100755 (executable)
@@ -23,7 +23,7 @@
 #define BACK_ICON_X 258
 #define BACK_ICON_Y 18
 #define SR_BACK_ICON_X 844
-#define SR_BACK_ICON_Y 8
+#define SR_BACK_ICON_Y 16
 
 #define BACK_IMAGE_W 17
 #define BACK_IMAGE_H 28
index 21b414fd6ed2c4dbee5b9744d5c45ac6bb54bd12..85462d12b678314de64a7a1be56169d6c73d5169 100755 (executable)
@@ -23,7 +23,7 @@
 #define HOME_ICON_X 152
 #define HOME_ICON_Y 18
 #define SR_HOME_ICON_X 616
-#define SR_HOME_ICON_Y 8
+#define SR_HOME_ICON_Y 16
 
 #define HOME_IMAGE_W 34
 #define HOME_IMAGE_H 34
index 4522a5b2ac67ca01e55d738b5542aad653a4af74..c0cfe03acca27c34d3944af4eec5fff652a74d68 100755 (executable)
 #include "softkey-container-window.h"
 
 
-#define ACTIVATE_BAR_X 136
+#define ACTIVATE_BAR_X 139
 #define ACTIVATE_BAR_Y 0
 #define ACTIVATE_BAR_W 80
 #define ACTIVATE_BAR_H 8
-#define TRANSLATION_VALUE 80
 #define BLUE_BAR_IMAGE_ACTIVE "img/02_softkey_bluebar_active.png"
 
-#define WIN_WIDTH 352 //this should equal to window size
+#define WIN_WIDTH 358 //this should equal to window size
 #define ACTIVATE_BAR_ANIMATED_SIZE 120
 
 static void activate_bar_resize_animation_end(Elm_Transit_Effect *effect, Elm_Transit *transit)
index 4bb62ab6f28642e263bbb0f244845a35972ab1cc..2bda5733567a91cbfa639ecc936a0b82d33024da 100755 (executable)
 //#define WIN_X 184   // Portrait mode X
 //#define WIN_Y 1192 // Portrait mode Y
 
-#define WIN_X 464
-#define WIN_Y 632
+#define WIN_X 461
+#define WIN_Y 628
 #define SR_WIN_X 0   /// Screen Reader mode window x
 #define SR_WIN_Y 656 /// Screen reader mode window y
 
-#define WIN_W 352
-#define WIN_H 88
+#define WIN_W 358
+#define WIN_H 92
 #define SR_WIN_W 1280 /// Screen Reader mode window width
-#define SR_WIN_H 64  /// Screen Reader mode window height
+#define SR_WIN_H 72  /// Screen Reader mode window height
 
-#define ROOT_GRID_W 352
-#define ROOT_GRID_H 80
+#define ROOT_GRID_W 358
+#define ROOT_GRID_H 92
 #define SR_ROOT_GRID_W 1280
-#define SR_ROOT_GRID_H 64
+#define SR_ROOT_GRID_H 72
 
-#define BG_IMAGE_W 350
-#define BG_IMAGE_H 80
+#define BG_IMAGE_W 358
+#define BG_IMAGE_H 92
 #define SR_BG_IMAGE_W 1280
-#define SR_BG_IMAGE_H 64
+#define SR_BG_IMAGE_H 72
 
 #define POST_ANIM_WIN_W 120
 #define POST_ANIM_WIN_H 8
 
 #define SOFTKEY_BG_IMAGE "img/02_bg_softkey_active.png"
+#define SR_SOFTKEY_BG_IMAGE "img/softkey_screen_reader_bg.png"
 
 typedef struct{
        //Service data member
@@ -271,25 +272,52 @@ create_background_image(Evas_Object *parent_grid)
        char *path = get_resource_path(SOFTKEY_BG_IMAGE);
        LOG_D("Softkey bg bar image path: %s", (path ? path : "null"));
        elm_image_file_set(bg_img, path, NULL);
-       efl_gfx_image_scale_method_set(bg_img, EFL_GFX_IMAGE_SCALE_METHOD_FILL);
+       // we have to clip the source image because source image is size of 370X98
+       // and because of UX tool issue regarding the shadow image
+       // they can't make it same size of container
+       // source image will have lot of space at boundary..that will create problem
+       // in animationa and event area.
+       Evas_Object *evas_img = elm_image_object_get(bg_img);
+       evas_object_image_load_region_set(evas_img, 6, 6, BG_IMAGE_W, BG_IMAGE_H);
+       evas_object_resize(bg_img, BG_IMAGE_W, BG_IMAGE_H);
        elm_grid_pack(parent_grid, bg_img, 0, 0, BG_IMAGE_W, BG_IMAGE_H);
+
        //free resource path
        free((void*)path);
+
        return bg_img;
 }
 
 static Evas_Object*
 create_background_rect(Evas_Object *parent_grid)
 {
-       /** Create Bg Rect for Screen Reader Mode
+       /** Create Bg image for Screen Reader Mode
         *  We create this rect at start because if create the rect at run time than,
         *  we need re-pack the root grid to keep the staking order correct.
         *  */
-       Evas_Object *bg_rect = evas_object_rectangle_add(parent_grid);
-       // Color value according to gui [#EEEFF1]
-       evas_object_color_set(bg_rect, 238, 239, 241, 255);
-       elm_grid_pack(parent_grid, bg_rect, 0, 0, SR_BG_IMAGE_W, SR_BG_IMAGE_H);
-       return bg_rect;
+       Evas_Object *sr_bg_img = elm_image_add(parent_grid);
+       if(sr_bg_img == NULL)
+       {
+               LOG_E("Failed to create screen reader mode background image for softkey");
+               return NULL;
+       }
+       char *path = get_resource_path(SR_SOFTKEY_BG_IMAGE);
+       LOG_D("Softkey screen reader bg bar image path: %s", (path ? path : "null"));
+       elm_image_file_set(sr_bg_img, path, NULL);
+       // we have to clip the source image because source image is size of 1298X72
+       // and because of UX tool issue regarding the shadow image
+       // they can't make it same size of container
+       // source image will have lot of space at boundary..that will create problem
+       // in animationa and event area.
+       Evas_Object *evas_img = elm_image_object_get(sr_bg_img);
+       evas_object_image_load_region_set(evas_img, 9, 0, SR_BG_IMAGE_W, SR_BG_IMAGE_H);
+       evas_object_resize(sr_bg_img, SR_BG_IMAGE_W, SR_BG_IMAGE_H);
+       elm_grid_pack(parent_grid, sr_bg_img, 0, 0, SR_BG_IMAGE_W, SR_BG_IMAGE_H);
+
+       //free resource path
+       free((void*)path);
+
+       return sr_bg_img;
 }
 
 void softkey_window_geometry_update(Evas_Object *win, Eina_Bool post_animation)
index b633ed350936927ce573ab458671f969909191b4..893b7af3c38a5d6fe5f14ad59abc30a0640f7bee 100755 (executable)
 
 /** TO DO need to define these value in common place */
 
-#define TRANSLATION_VALUE 80
+#define TRANSLATION_VALUE 84
 #define TRANSLATION_DURATION 0.3
 #define END_WIDTH 120
 #define START_WIDTH 80
-#define CONTAINER_WIDTH 352   // this has to be same as window width.
+#define CONTAINER_WIDTH 358   // this has to be same as window width.
 #define ACTIVATE_BAR_HEIGHT 8
 #define ACTIVATE_BAR_START_Y 0
 #define ACTIVATE_BAR_END_Y 80
@@ -54,11 +54,9 @@ void activate_bar_resizing_effect_cb(Elm_Transit_Effect *effect, Elm_Transit *tr
        int pos_y = 0;
        if(softkey_container_current_visible_state_get() == SOFTKEY_STATE_VISIBLE_FULL){
                width = START_WIDTH + ((END_WIDTH - START_WIDTH) * progress);
-               pos_y = ACTIVATE_BAR_START_Y + ((ACTIVATE_BAR_END_Y - ACTIVATE_BAR_START_Y) * progress);
        }
        else {
                width = END_WIDTH - ((END_WIDTH - START_WIDTH) * progress);
-               pos_y = ACTIVATE_BAR_END_Y - ((ACTIVATE_BAR_END_Y - ACTIVATE_BAR_START_Y) * progress);
        }
 
        int pos_x = (CONTAINER_WIDTH/2) - (width/2);
index 44522441fffc35e8570584cef12350095fe327ec..1c0ab4dcf18b759fc7a6da83f5088c413c6c8ecc 100755 (executable)
@@ -23,7 +23,7 @@
 #define RECENT_ICON_X 46
 #define RECENT_ICON_Y 18
 #define SR_RECENT_ICON_X 388
-#define SR_RECENT_ICON_Y 8
+#define SR_RECENT_ICON_Y 16
 
 
 #define RECENT_IMG_W 20