From f745309fc598e7fab069ce7915cf0dad50943e4e Mon Sep 17 00:00:00 2001 From: Jagrat Patidar Date: Thu, 17 Dec 2020 15:19:03 +0530 Subject: [PATCH] [TIZENIOT-2273]Resolves uneven margins in portrait mode Change-Id: I7b88e3e4483f63315402adcfc7f1eb6e519cdaed --- src/apps_view.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/apps_view.c b/src/apps_view.c index b3dda18..74fb950 100644 --- a/src/apps_view.c +++ b/src/apps_view.c @@ -565,7 +565,13 @@ bool apps_view_icon_set(app_data_t *item) w = (APPS_VIEW_W * APPS_VIEW_CONST_W) / APPS_VIEW_COL_COMMON; h = (APPS_VIEW_H * APPS_VIEW_CONST_H) / APPS_VIEW_ROW_COMMON; - x = APPS_VIEW_W * 0.083 + col * w; + //Calculating horizontal padding by subtracting horizontal icon area from screen width + int horizontal_padding = APPS_VIEW_W - (w * (APPS_VIEW_COL_COMMON - 1)) - APPS_VIEW_ICON_IMAGE; + + //For left and right side dividing it in half + horizontal_padding = horizontal_padding / 2; + + x = horizontal_padding + col * w; y = APPS_VIEW_PADDING_TOP + APPS_VIEW_H * 0.127 + row * h; if (eina_list_count(apps_view_s.page_list) < page_index+1) { page = __apps_view_add_page(); -- 2.7.4