Changed window width on landscape mode 81/140881/1 submit/tizen/20170727.072258 submit/tizen_4.0/20170811.094300
authorjin0.kim <jin0.kim@samsung.com>
Thu, 27 Jul 2017 04:52:20 +0000 (13:22 +0830)
committerjin0.kim <jin0.kim@samsung.com>
Thu, 27 Jul 2017 04:52:54 +0000 (13:22 +0830)
Change-Id: I4676314d2219cf6dce122bf0a30dd4f781350037

src/notifications/noti_win.c

index 60b1c9b..e04fbec 100755 (executable)
@@ -98,28 +98,27 @@ static void _win_rotated(Evas_Object *obj)
 
        wd->angle = angle;
 
+       evas_object_resize(obj, 0, 0);
+       evas_object_resize(obj, wd->scr_w, wd->h);
        switch (angle) {
        case 0:
        case 180:
                quickpanel_activenoti_set_display_mode(false);
                g_isLandscape =  false;
 
-               evas_object_resize(obj, wd->scr_w, wd->h);
                evas_object_move(obj, 0, 0);
                break;
        case 90:
                quickpanel_activenoti_set_display_mode(true);
                g_isLandscape =  true;
 
-               evas_object_resize(obj, wd->scr_h, wd->h);
-               evas_object_move(obj, 0, 0);
+               evas_object_move(obj, 0, ((wd->scr_h - wd->scr_w) /2));
                break;
        case 270:
                quickpanel_activenoti_set_display_mode(true);
                g_isLandscape =  true;
 
-               evas_object_resize(obj, wd->scr_h, wd->h);
-               evas_object_move(obj, wd->scr_w - wd->h, 0);
+               evas_object_move(obj, wd->scr_w - wd->h, ((wd->scr_h - wd->scr_w) /2));
                break;
        default:
                ERR("cannot reach here");
@@ -263,19 +262,18 @@ HAPI void quickpanel_noti_win_resize_height(Evas_Object *obj, enum noti_layout_t
        evas_object_data_set(obj, E_DATA_KEY, wd);
        DBG("Set WINDOW internal data : width %d scr_w : %d height : %d scr_h : %d angle %d", wd->w, wd->scr_w, wd->h, wd->scr_h, wd->angle);
 
+       evas_object_resize(obj, 0, 0);
+       evas_object_resize(obj, wd->scr_w, wd->h);
        switch (wd->angle) {
        case 0:
        case 180:
-               evas_object_resize(obj, wd->scr_w, wd->h);
                evas_object_move(obj, 0, 0);
                break;
        case 90:
-               evas_object_resize(obj, wd->scr_h, wd->h);
-               evas_object_move(obj, 0, 0);
+               evas_object_move(obj, 0, ((wd->scr_h - wd->scr_w) /2));
                break;
        case 270:
-               evas_object_resize(obj, wd->scr_h, wd->h);
-               evas_object_move(obj, wd->scr_w - wd->h, 0);
+               evas_object_move(obj, wd->scr_w - wd->h, ((wd->scr_h - wd->scr_w) /2));
                break;
        default:
                ERR("cannot reach here");