summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2015-12-15 07:26:58 (GMT)
committerMinkyu Kang <mk7.kang@samsung.com>2015-12-15 07:26:58 (GMT)
commit33e799d9739fba539c51d6b379cb826d8c856c96 (patch)
tree526ec4082f2df14d214a3914afe72b80e082b00e
parenta167d7f44c54bd229a306ffce4106616c9d19993 (diff)
downloadair_mediahub-33e799d9739fba539c51d6b379cb826d8c856c96.zip
air_mediahub-33e799d9739fba539c51d6b379cb826d8c856c96.tar.gz
air_mediahub-33e799d9739fba539c51d6b379cb826d8c856c96.tar.bz2
apply multi scalerefs/changes/22/54422/1
Change-Id: I5cc508d90419991710959046f6154ee6a15899d2 Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r--res/edc/mediahub-theme.edc1
-rw-r--r--res/edc/mediahub.edc1
-rw-r--r--src/main.c1
-rw-r--r--src/util/ctxpopup.c4
-rw-r--r--src/util/listmgr.c11
-rw-r--r--src/util/util.c6
-rw-r--r--src/view/action_menu.c10
-rw-r--r--src/view/detail.c4
8 files changed, 22 insertions, 16 deletions
diff --git a/res/edc/mediahub-theme.edc b/res/edc/mediahub-theme.edc
index 2c699e5..701f33d 100644
--- a/res/edc/mediahub-theme.edc
+++ b/res/edc/mediahub-theme.edc
@@ -17,6 +17,7 @@
#include "../../include/define.h"
collections {
+ base_scale: 2.0;
#include "widgets/button.edc"
#include "widgets/ctxpopup.edc"
#include "widgets/gengrid.edc"
diff --git a/res/edc/mediahub.edc b/res/edc/mediahub.edc
index 0ba1db7..17a8680 100644
--- a/res/edc/mediahub.edc
+++ b/res/edc/mediahub.edc
@@ -17,6 +17,7 @@
#include "../../include/define.h"
collections {
+ base_scale: 2.0;
#include "view/base.edc"
#include "view/detail.edc"
#include "view/viewer.edc"
diff --git a/src/main.c b/src/main.c
index cec4807..43d96e3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -70,6 +70,7 @@ static bool _create(void *data)
ad = data;
+ elm_app_base_scale_set(APP_BASE_SCALE);
elm_theme_overlay_add(NULL, THEMEFILE);
elm_config_focus_move_policy_set(ELM_FOCUS_MOVE_POLICY_CLICK);
diff --git a/src/util/ctxpopup.c b/src/util/ctxpopup.c
index d537bf0..c1c8f62 100644
--- a/src/util/ctxpopup.c
+++ b/src/util/ctxpopup.c
@@ -115,8 +115,8 @@ void ctxpopup_show(struct ctxpopup *m, int x, int y)
if (m->focused_btn)
elm_object_focus_set(m->focused_btn, EINA_TRUE);
- evas_object_move(m->popup, x * elm_config_scale_get(),
- y * elm_config_scale_get());
+ evas_object_move(m->popup, ELM_SCALE_SIZE(x),
+ ELM_SCALE_SIZE(y));
evas_object_show(m->popup);
}
diff --git a/src/util/listmgr.c b/src/util/listmgr.c
index 99dc3fd..be8eae3 100644
--- a/src/util/listmgr.c
+++ b/src/util/listmgr.c
@@ -422,8 +422,8 @@ static Evas_Object *_add_list_item_grid(struct listmgr *lmgr,
width = _get_grid_width(eina_list_count(gi->list), gdata->item_num,
gdata->item_x);
- evas_object_size_hint_min_set(grid, width,
- gdata->item_num * gdata->item_y);
+ evas_object_size_hint_min_set(grid, ELM_SCALE_SIZE(width),
+ ELM_SCALE_SIZE(gdata->item_num * gdata->item_y));
elm_object_focus_next_object_set(grid, lmgr->data->view_btn,
ELM_FOCUS_DOWN);
@@ -807,10 +807,11 @@ bool listmgr_update_content_list(struct listmgr *lmgr, Eina_List *list,
lmgr->data->gdata = gdata;
- elm_scroller_step_size_set(lmgr->scr, SCROLLER_STEP_SIZE(
- gdata->grid_padding + gdata->item_x), 0);
+ elm_scroller_step_size_set(lmgr->scr, ELM_SCALE_SIZE(SCROLLER_STEP_SIZE(
+ gdata->grid_padding + gdata->item_x)), 0);
- elm_box_padding_set(lmgr->box, gdata->grid_padding, 0);
+ elm_box_padding_set(lmgr->box, ELM_SCALE_SIZE(gdata->grid_padding),
+ ELM_SCALE_SIZE(gdata->grid_padding));
ly = NULL;
EINA_LIST_FOREACH(list, l, gi) {
diff --git a/src/util/util.c b/src/util/util.c
index d44205d..4a4f833 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -154,8 +154,8 @@ Evas_Object *util_add_gengrid(Evas_Object *base, int item_size_x,
elm_gengrid_align_set(grid, 0.0, 0.0);
elm_gengrid_item_size_set(grid,
- elm_config_scale_get() * item_size_x,
- elm_config_scale_get() * item_size_y);
+ ELM_SCALE_SIZE(item_size_x),
+ ELM_SCALE_SIZE(item_size_y));
elm_scroller_policy_set(grid, ELM_SCROLLER_POLICY_OFF,
ELM_SCROLLER_POLICY_OFF);
@@ -180,6 +180,8 @@ Evas_Object *util_add_genlist(Evas_Object *base)
elm_genlist_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
elm_genlist_multi_select_set(list, EINA_FALSE);
+ elm_scroller_policy_set(list, ELM_SCROLLER_POLICY_OFF,
+ ELM_SCROLLER_POLICY_OFF);
return list;
}
diff --git a/src/view/action_menu.c b/src/view/action_menu.c
index dbed15a..3d87e96 100644
--- a/src/view/action_menu.c
+++ b/src/view/action_menu.c
@@ -819,8 +819,8 @@ static void _update_favorite_area(struct _priv *priv)
}
elm_gengrid_item_size_set(priv->grid,
- elm_config_scale_get() * content_info[type].grid_x,
- elm_config_scale_get() * content_info[type].grid_y);
+ ELM_SCALE_SIZE(content_info[type].grid_x),
+ ELM_SCALE_SIZE(content_info[type].grid_y));
ic = _get_grid_item_class(type);
@@ -836,10 +836,10 @@ static void _update_favorite_area(struct _priv *priv)
if (eina_list_count(priv->favorite_list) % content_info[type].grid_n)
count++;
- evas_object_size_hint_min_set(priv->grid, 0, elm_config_scale_get() *
- content_info[type].grid_y * count);
+ evas_object_size_hint_min_set(priv->grid, 0,
+ ELM_SCALE_SIZE(content_info[type].grid_y * count));
elm_scroller_step_size_set(priv->scr, 0,
- content_info[type].grid_y + GRID_PADDING);
+ ELM_SCALE_SIZE(content_info[type].grid_y + GRID_PADDING));
elm_object_part_content_set(priv->content,
PART_ACTION_FAVORITE_AREA, priv->grid);
diff --git a/src/view/detail.c b/src/view/detail.c
index 9a8e2a0..d7d4839 100644
--- a/src/view/detail.c
+++ b/src/view/detail.c
@@ -854,8 +854,8 @@ static bool _update_thumbnail_area(struct _priv *priv)
elm_gengrid_clear(priv->grid);
elm_gengrid_item_size_set(priv->grid,
- elm_config_scale_get() * priv->vinfo->grid_item_x,
- elm_config_scale_get() * priv->vinfo->grid_item_y);
+ ELM_SCALE_SIZE(priv->vinfo->grid_item_x),
+ ELM_SCALE_SIZE(priv->vinfo->grid_item_y));
ic = _get_grid_item_class(priv->vinfo);
if (!ic) {