char buf[256];
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
// popup title
elm_object_part_text_set(popup, "title,text", "Title");
Evas_Object *popup, *icon1, *btn1, *btn2, *btn3;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
// popup title
elm_object_part_text_set(popup, "title,text", "Title");
Evas_Object *btn, *btn2;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
evas_object_smart_callback_add(popup, "block,clicked",
_restack_block_clicked_cb, NULL);
}
g_popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(g_popup, is_popup_scroll);
+ elm_popup_scrollable_set(g_popup, is_popup_scroll);
elm_object_text_set(g_popup, "Hide this popup by using the button."
"When you click list item again, you can see this popup.");
int i;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
// popup title
elm_object_part_text_set(popup, "title,text",
Evas_Object *btn;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
elm_object_style_set(popup, "transparent");
elm_object_text_set(popup, "This Popup has transparent background");
Evas_Object *btn, *btn1;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
elm_object_style_set(popup, "transparent");
elm_object_text_set(popup, "This Popup has transparent background");
Evas_Object *btn;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
elm_object_part_text_set(popup, "title,text", "Title");
// list as a popup content
int i;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
elm_object_part_text_set(popup, "title,text", "Title");
Elm_Genlist_Item_Class *itc1 = elm_genlist_item_class_new();
// genlist as a popup content
genlist = elm_genlist_add(popup);
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
+ elm_genlist_mode_set(genlist, ELM_LIST_EXPAND);
elm_scroller_content_min_limit(genlist, EINA_FALSE, EINA_TRUE);
for (i = 0; i < 10; i++)
Evas_Object *btn, *btnclose;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
elm_object_style_set(popup, "subpopup");
elm_object_part_text_set(popup, "title,text", "Title");
Evas_Object *win = data;
popup = elm_popup_add(win);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
bx = elm_box_add(popup);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(check);
evas_object_smart_callback_add(check, "changed", _popup_scroll_cb, NULL);
+ if (elm_config_popup_scrollable_get())
+ {
+ elm_check_state_set(check, EINA_TRUE);
+ is_popup_scroll = EINA_TRUE;
+ }
+
evas_object_resize(win, 480, 400);
evas_object_show(win);
}
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);
+ ELM_CONFIG_VAL(D, T, popup_scrollable, T_UCHAR);
ELM_CONFIG_VAL(D, T, spinner_min_max_filter_enable, T_UCHAR);
ELM_CONFIG_VAL(D, T, icon_theme, T_STRING);
#undef T
_elm_config->popup_horizontal_align = 0.5;
_elm_config->popup_vertical_align = 0.5;
_elm_config->icon_theme = eina_stringshare_add(ELM_CONFIG_ICON_THEME_ELEMENTARY);
+ _elm_config->popup_scrollable = EINA_FALSE;
}
static void
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);
+ s = getenv("ELM_POPUP_SCROLLABLE");
+ if (s) _elm_config->popup_scrollable = atoi(s);
}
static void
_elm_config->win_auto_focus_animate = enable;
}
+EAPI Eina_Bool
+elm_config_popup_scrollable_get(void)
+{
+ return _elm_config->popup_scrollable;
+}
+
+EAPI void
+elm_config_popup_scrollable_set(Eina_Bool scrollable)
+{
+ _elm_config->popup_scrollable = scrollable;
+}
+
EAPI void
elm_config_all_flush(void)
{