multibuttonentry: Fix padding to be affected by base_scale in edc.

Summary:
MBE internal box get its padding size from edc.
Previously, it does not consider when calculating the padding size.
In this commit, the padding size from edc is divided by its base_scale
so that desirable size can be calculated.

@fix

Reviewers: Hermet, cedric

Differential Revision: https://phab.enlightenment.org/D3103
This commit is contained in:
woochan lee 2015-10-01 19:35:58 +09:00 committed by ChunEon Park
parent 972d418377
commit 6f46c328a3
1 changed files with 8 additions and 4 deletions

View File

@ -105,8 +105,10 @@ _elm_multibuttonentry_elm_widget_theme_apply(Eo *obj, Elm_Multibuttonentry_Data
if (str) vpad = atoi(str);
elm_box_padding_set
(sd->box,
hpad * elm_widget_scale_get(obj) * elm_config_scale_get(),
vpad * elm_widget_scale_get(obj) * elm_config_scale_get());
hpad * elm_widget_scale_get(obj) * elm_config_scale_get()
/ edje_object_base_scale_get(elm_layout_edje_get(obj)),
vpad * elm_widget_scale_get(obj) * elm_config_scale_get()
/ edje_object_base_scale_get(elm_layout_edje_get(obj)));
EINA_LIST_FOREACH(sd->items, l, eo_item)
{
@ -1415,8 +1417,10 @@ _view_init(Evas_Object *obj, Elm_Multibuttonentry_Data *sd)
if (str) vpad = atoi(str);
elm_box_padding_set
(sd->box,
hpad * elm_widget_scale_get(obj) * elm_config_scale_get(),
vpad * elm_widget_scale_get(obj) * elm_config_scale_get());
hpad * elm_widget_scale_get(obj) * elm_config_scale_get()
/ edje_object_base_scale_get(elm_layout_edje_get(obj)),
vpad * elm_widget_scale_get(obj) * elm_config_scale_get()
/ edje_object_base_scale_get(elm_layout_edje_get(obj)));
elm_box_layout_set(sd->box, _box_layout_cb, obj, NULL);
elm_box_homogeneous_set(sd->box, EINA_FALSE);