summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaehyub <taehyub.kim@samsung.com>2015-12-07 15:53:47 -0800
committerCedric BAIL <cedric@osg.samsung.com>2015-12-07 16:39:40 -0800
commit61648ba5a38bc8ab1e7a4721f17683abc701ebd4 (patch)
treeab6bfa2f57aa3415ebf5853e6e7b6a506492f58a
parent9664f44d7cd8e6bc8253017da2c1d0ef8ccd3088 (diff)
popup: add popup default align config for other profiles.
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 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--config/default/base.src.in2
-rw-r--r--config/mobile/base.src.in2
-rw-r--r--config/standard/base.src.in2
-rw-r--r--src/lib/elc_popup.c5
-rw-r--r--src/lib/elm_config.c9
-rw-r--r--src/lib/elm_priv.h2
6 files changed, 21 insertions, 1 deletions
diff --git a/config/default/base.src.in b/config/default/base.src.in
index 5caff3d6f..188f41ffb 100644
--- a/config/default/base.src.in
+++ b/config/default/base.src.in
@@ -95,6 +95,8 @@ group "Elm_Config" struct {
95 value "win_auto_focus_animate" uchar: 1; 95 value "win_auto_focus_animate" uchar: 1;
96 value "transition_duration_factor" double: 1.0; 96 value "transition_duration_factor" double: 1.0;
97 value "naviframe_prev_btn_auto_pushed" uchar: 1; 97 value "naviframe_prev_btn_auto_pushed" uchar: 1;
98 value "popup_horizontal_align" double: 0.5;
99 value "popup_vertical_align" double: 0.5;
98 group "color_palette" list { 100 group "color_palette" list {
99 group "Elm_Custom_Palette" struct { 101 group "Elm_Custom_Palette" struct {
100 value "palette_name" string: "default"; 102 value "palette_name" string: "default";
diff --git a/config/mobile/base.src.in b/config/mobile/base.src.in
index 6621fb888..aea7ae250 100644
--- a/config/mobile/base.src.in
+++ b/config/mobile/base.src.in
@@ -99,6 +99,8 @@ group "Elm_Config" struct {
99 value "win_auto_focus_animate" uchar: 1; 99 value "win_auto_focus_animate" uchar: 1;
100 value "transition_duration_factor" double: 1.0; 100 value "transition_duration_factor" double: 1.0;
101 value "naviframe_prev_btn_auto_pushed" uchar: 1; 101 value "naviframe_prev_btn_auto_pushed" uchar: 1;
102 value "popup_horizontal_align" double: 0.5;
103 value "popup_vertical_align" double: 0.5;
102 group "color_palette" list { 104 group "color_palette" list {
103 group "Elm_Custom_Palette" struct { 105 group "Elm_Custom_Palette" struct {
104 value "palette_name" string: "default"; 106 value "palette_name" string: "default";
diff --git a/config/standard/base.src.in b/config/standard/base.src.in
index a89bebad0..2d8788407 100644
--- a/config/standard/base.src.in
+++ b/config/standard/base.src.in
@@ -96,6 +96,8 @@ group "Elm_Config" struct {
96 value "win_auto_focus_animate" uchar: 1; 96 value "win_auto_focus_animate" uchar: 1;
97 value "transition_duration_factor" double: 1.0; 97 value "transition_duration_factor" double: 1.0;
98 value "naviframe_prev_btn_auto_pushed" uchar: 1; 98 value "naviframe_prev_btn_auto_pushed" uchar: 1;
99 value "popup_horizontal_align" double: 0.5;
100 value "popup_vertical_align" double: 0.5;
99 group "color_palette" list { 101 group "color_palette" list {
100 group "Elm_Custom_Palette" struct { 102 group "Elm_Custom_Palette" struct {
101 value "palette_name" string: "default"; 103 value "palette_name" string: "default";
diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c
index 9e8d0415f..7c926f999 100644
--- a/src/lib/elc_popup.c
+++ b/src/lib/elc_popup.c
@@ -1475,7 +1475,10 @@ _elm_popup_evas_object_smart_add(Eo *obj, Elm_Popup_Data *priv)
1475 1475
1476 priv->notify = elm_notify_add(obj); 1476 priv->notify = elm_notify_add(obj);
1477 elm_object_style_set(priv->notify, style); 1477 elm_object_style_set(priv->notify, style);
1478 elm_notify_align_set(priv->notify, 0.5, 0.5); 1478
1479 elm_notify_align_set(priv->notify,
1480 _elm_config->popup_horizontal_align,
1481 _elm_config->popup_vertical_align);
1479 elm_notify_allow_events_set(priv->notify, EINA_FALSE); 1482 elm_notify_allow_events_set(priv->notify, EINA_FALSE);
1480 evas_object_size_hint_weight_set 1483 evas_object_size_hint_weight_set
1481 (priv->notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 1484 (priv->notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 22b490938..8e5320c6a 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -439,6 +439,8 @@ _desc_init(void)
439 ELM_CONFIG_VAL(D, T, win_auto_focus_animate, T_UCHAR); 439 ELM_CONFIG_VAL(D, T, win_auto_focus_animate, T_UCHAR);
440 ELM_CONFIG_VAL(D, T, transition_duration_factor, T_DOUBLE); 440 ELM_CONFIG_VAL(D, T, transition_duration_factor, T_DOUBLE);
441 ELM_CONFIG_VAL(D, T, naviframe_prev_btn_auto_pushed, T_UCHAR); 441 ELM_CONFIG_VAL(D, T, naviframe_prev_btn_auto_pushed, T_UCHAR);
442 ELM_CONFIG_VAL(D, T, popup_horizontal_align, T_DOUBLE);
443 ELM_CONFIG_VAL(D, T, popup_vertical_align, T_DOUBLE);
442#undef T 444#undef T
443#undef D 445#undef D
444#undef T_INT 446#undef T_INT
@@ -1468,6 +1470,8 @@ _config_load(void)
1468 _elm_config->gl_stencil = 0; 1470 _elm_config->gl_stencil = 0;
1469 _elm_config->transition_duration_factor = 1.0; 1471 _elm_config->transition_duration_factor = 1.0;
1470 _elm_config->naviframe_prev_btn_auto_pushed = EINA_TRUE; 1472 _elm_config->naviframe_prev_btn_auto_pushed = EINA_TRUE;
1473 _elm_config->popup_horizontal_align = 0.5;
1474 _elm_config->popup_vertical_align = 0.5;
1471} 1475}
1472 1476
1473static void 1477static void
@@ -2146,6 +2150,11 @@ _env_get(void)
2146 2150
2147 s = getenv("ELM_TRANSITION_DURATION_FACTOR"); 2151 s = getenv("ELM_TRANSITION_DURATION_FACTOR");
2148 if (s) _elm_config->transition_duration_factor = atof(s); 2152 if (s) _elm_config->transition_duration_factor = atof(s);
2153
2154 s = getenv("ELM_POPUP_HORIZONTAL_ALIGN");
2155 if (s) _elm_config->popup_horizontal_align = _elm_atof(s);
2156 s = getenv("ELM_POPUP_VERTICAL_ALIGN");
2157 if (s) _elm_config->popup_vertical_align = _elm_atof(s);
2149} 2158}
2150 2159
2151static void 2160static void
diff --git a/src/lib/elm_priv.h b/src/lib/elm_priv.h
index 61c06a8bd..6c26a038a 100644
--- a/src/lib/elm_priv.h
+++ b/src/lib/elm_priv.h
@@ -246,6 +246,8 @@ struct _Elm_Config
246 unsigned char first_item_focus_on_first_focus_in; /**< This sets the first item focus on first focus in feature*/ 246 unsigned char first_item_focus_on_first_focus_in; /**< This sets the first item focus on first focus in feature*/
247 Elm_Focus_Autoscroll_Mode focus_autoscroll_mode; /**< This shows the focus auto scroll mode. By default, @c ELM_FOCUS_AUTOSCROLL_MODE_SHOW is set. */ 247 Elm_Focus_Autoscroll_Mode focus_autoscroll_mode; /**< This shows the focus auto scroll mode. By default, @c ELM_FOCUS_AUTOSCROLL_MODE_SHOW is set. */
248 Elm_Slider_Indicator_Visible_Mode slider_indicator_visible_mode; /**< this sets the slider indicator visible mode */ 248 Elm_Slider_Indicator_Visible_Mode slider_indicator_visible_mode; /**< this sets the slider indicator visible mode */
249 double popup_horizontal_align;
250 double popup_vertical_align;
249 int toolbar_shrink_mode; 251 int toolbar_shrink_mode;
250 unsigned char fileselector_expand_enable; 252 unsigned char fileselector_expand_enable;
251 unsigned char fileselector_double_tap_navigation_enable; 253 unsigned char fileselector_double_tap_navigation_enable;