popup: add popup default align config for other profiles. 03/63103/2
authortaehyub <taehyub.kim@samsung.com>
Mon, 7 Dec 2015 23:53:47 +0000 (15:53 -0800)
committerYoungbok Shin <youngb.shin@samsung.com>
Tue, 22 Mar 2016 08:29:10 +0000 (01:29 -0700)
Summary:
The alignment of popup can be different in each profiles.
So I added the align configuration of popup.
@feature

Reviewers: cedric, woohyun

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

Change-Id: I5c86f51236c2136e1a9bb88febc973e008ca505a
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
config/default/base.src.in
config/mobile/base.src.in
config/standard/base.src.in
src/lib/elc_popup.c
src/lib/elm_config.c
src/lib/elm_priv.h

index 5caff3d6fc7fa05f425a89ecb48142540c7f3999..188f41ffbf90545531ad9b8e92844baaaa76f489 100644 (file)
@@ -95,6 +95,8 @@ group "Elm_Config" struct {
   value "win_auto_focus_animate" uchar: 1;
   value "transition_duration_factor" double: 1.0;
   value "naviframe_prev_btn_auto_pushed" uchar: 1;
+  value "popup_horizontal_align" double: 0.5;
+  value "popup_vertical_align" double: 0.5;
   group "color_palette" list {
      group "Elm_Custom_Palette" struct {
         value "palette_name" string: "default";
index 6621fb88822ce49f3dee40db13e4be54277d3f98..aea7ae250178c938982a5051d57f023edd79180a 100644 (file)
@@ -99,6 +99,8 @@ group "Elm_Config" struct {
   value "win_auto_focus_animate" uchar: 1;
   value "transition_duration_factor" double: 1.0;
   value "naviframe_prev_btn_auto_pushed" uchar: 1;
+  value "popup_horizontal_align" double: 0.5;
+  value "popup_vertical_align" double: 0.5;
   group "color_palette" list {
      group "Elm_Custom_Palette" struct {
         value "palette_name" string: "default";
index a89bebad0770d946ca67690906f56610f6d6232d..2d878840710e1e68c79dff9b25d796d707743180 100644 (file)
@@ -96,6 +96,8 @@ group "Elm_Config" struct {
   value "win_auto_focus_animate" uchar: 1;
   value "transition_duration_factor" double: 1.0;
   value "naviframe_prev_btn_auto_pushed" uchar: 1;
+  value "popup_horizontal_align" double: 0.5;
+  value "popup_vertical_align" double: 0.5;
   group "color_palette" list {
      group "Elm_Custom_Palette" struct {
         value "palette_name" string: "default";
index 228ef1d56335f20c3d5eabebf4ffa36cc25acabc..31b8500f5fb055547916cf5cc2f6d973cd048f64 100644 (file)
@@ -1570,7 +1570,10 @@ _elm_popup_evas_object_smart_add(Eo *obj, Elm_Popup_Data *priv)
 
    priv->notify = elm_notify_add(obj);
    elm_object_style_set(priv->notify, style);
-   elm_notify_align_set(priv->notify, 0.5, 0.5);
+
+   elm_notify_align_set(priv->notify,
+                        _elm_config->popup_horizontal_align,
+                        _elm_config->popup_vertical_align);
    elm_notify_allow_events_set(priv->notify, EINA_FALSE);
    evas_object_size_hint_weight_set
      (priv->notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
index 80964f723647173cd6de6b344c4f18a3fb1a2fdc..7ee67ebddfd7a7c584ef84a55a6cd6a2a05656e5 100644 (file)
@@ -436,6 +436,8 @@ _desc_init(void)
    ELM_CONFIG_VAL(D, T, win_auto_focus_animate, T_UCHAR);
    ELM_CONFIG_VAL(D, T, transition_duration_factor, T_DOUBLE);
    ELM_CONFIG_VAL(D, T, naviframe_prev_btn_auto_pushed, T_UCHAR);
+   ELM_CONFIG_VAL(D, T, popup_horizontal_align, T_DOUBLE);
+   ELM_CONFIG_VAL(D, T, popup_vertical_align, T_DOUBLE);
 #undef T
 #undef D
 #undef T_INT
@@ -1466,6 +1468,8 @@ _config_load(void)
    _elm_config->gl_stencil = 0;
    _elm_config->transition_duration_factor = 1.0;
    _elm_config->naviframe_prev_btn_auto_pushed = EINA_TRUE;
+   _elm_config->popup_horizontal_align = 0.5;
+   _elm_config->popup_vertical_align = 0.5;
 }
 
 static void
@@ -2144,6 +2148,11 @@ _env_get(void)
 
    s = getenv("ELM_TRANSITION_DURATION_FACTOR");
    if (s) _elm_config->transition_duration_factor = atof(s);
+
+   s = getenv("ELM_POPUP_HORIZONTAL_ALIGN");
+   if (s) _elm_config->popup_horizontal_align = _elm_atof(s);
+   s = getenv("ELM_POPUP_VERTICAL_ALIGN");
+   if (s) _elm_config->popup_vertical_align = _elm_atof(s);
 }
 
 static void
@@ -3692,4 +3701,4 @@ EAPI void
 elm_finger_size_set(Evas_Coord size)
 {
    elm_config_finger_size_set(size);
-}
\ No newline at end of file
+}
index 18f334aa3ff9cbca63afc584c66bdf458c93b6dc..7a1a8d517b378ed52e42b42c59f2b91b08cdf11e 100644 (file)
@@ -236,6 +236,8 @@ struct _Elm_Config
    unsigned char first_item_focus_on_first_focus_in;  /**< This sets the first item focus on first focus in feature*/
    Elm_Focus_Autoscroll_Mode focus_autoscroll_mode; /**< This shows the focus auto scroll mode. By default, @c ELM_FOCUS_AUTOSCROLL_MODE_SHOW is set. */
    Elm_Slider_Indicator_Visible_Mode  slider_indicator_visible_mode;  /**< this sets the slider indicator visible mode */
+   double        popup_horizontal_align;
+   double        popup_vertical_align;
    int           toolbar_shrink_mode;
    unsigned char fileselector_expand_enable;
    unsigned char fileselector_double_tap_navigation_enable;