elm_colorselector: fix horiz/vertical padding to be affected by base_scale in edc

Summary:
elm_colorselector get its padding size from data in edc.
However, when calculating the padding size, it does not consider
base_scale of the style from where it gets 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, woohyun

Subscribers: woohyun, Hermet

Differential Revision: https://phab.enlightenment.org/D2721

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Sung-Taek Hong 2015-06-22 11:55:52 +02:00 committed by Cedric BAIL
parent cbb9985b9b
commit b38c83cd73
1 changed files with 4 additions and 4 deletions

View File

@ -1114,8 +1114,8 @@ _elm_colorselector_elm_widget_theme_apply(Eo *obj, Elm_Colorselector_Data *sd)
elm_box_padding_set
(sd->palette_box,
(h_pad * elm_widget_scale_get(obj) * elm_config_scale_get()),
(v_pad * elm_widget_scale_get(obj) * elm_config_scale_get()));
(h_pad / edje_object_base_scale_get(wd->resize_obj) * elm_widget_scale_get(obj) * elm_config_scale_get()),
(v_pad / edje_object_base_scale_get(wd->resize_obj) * elm_widget_scale_get(obj) * elm_config_scale_get()));
EINA_LIST_FOREACH(sd->items, elist, eo_item)
{
@ -1605,8 +1605,8 @@ _create_colorpalette(Evas_Object *obj)
elm_box_padding_set
(sd->palette_box,
(h_pad * elm_widget_scale_get(obj) * elm_config_scale_get()),
(v_pad * elm_widget_scale_get(obj) * elm_config_scale_get()));
(h_pad / edje_object_base_scale_get(wd->resize_obj) * elm_widget_scale_get(obj) * elm_config_scale_get()),
(v_pad / edje_object_base_scale_get(wd->resize_obj) * elm_widget_scale_get(obj) * elm_config_scale_get()));
elm_box_align_set(sd->palette_box, 0.0, 0.0);
if (!elm_layout_content_set(obj, "elm.palette", sd->palette_box))