Evas_Coord_Point max_size;
Evas_Coord_Point min_size;
Evas_Coord_Point temp;
+ Evas_Object *win = NULL;
int idx;
const char *str;
else if (pos.y > hover_area.y + hover_area.h) pos.y = hover_area.y + hover_area.h;
/* END */
+ win = elm_object_top_widget_get(obj);
+ if ((win) && (!eo_isa(win, ELM_WIN_CLASS)))
+ win = NULL;
+
//recalc the edje
edje_object_size_min_calc
(wd->resize_obj, &base_size.x, &base_size.y);
//Limit to Max Size
evas_object_size_hint_max_get(obj, &max_size.x, &max_size.y);
- if ((max_size.x == -1) || (max_size.y == -1))
+ if (max_size.x == -1)
{
- str = edje_object_data_get(sd->layout, "visible_maxw");
- if (str)
+ if ((str = edje_object_data_get(sd->layout, "match_max_width")) &&
+ (!strcmp(str, "portrait_width")) && (win))
+ elm_win_screen_size_get(win, NULL, NULL, &max_size.x, NULL);
+ else if (str = edje_object_data_get(sd->layout, "visible_maxw"))
max_size.x = (int)(atoi(str)
* elm_config_scale_get()
* elm_object_scale_get(obj)
/ edje_object_base_scale_get(sd->layout) + 0.5);
+ }
+ if (max_size.y == -1)
+ {
str = edje_object_data_get(sd->layout, "visible_maxh");
if (str)
max_size.y = (int)(atoi(str)
//Limit to Min Size
evas_object_size_hint_min_get(obj, &min_size.x, &min_size.y);
- if ((min_size.x == 0) || (min_size.y == 0))
- edje_object_size_min_get(sd->layout, &min_size.x, &min_size.y);
+ if (min_size.x == 0)
+ {
+ if ((str = edje_object_data_get(sd->layout, "match_min_width")) &&
+ (!strcmp(str, "portrait_width")) && (win))
+ elm_win_screen_size_get(win, NULL, NULL, &min_size.x, NULL);
+ else
+ edje_object_size_min_get(sd->layout, &min_size.x, NULL);
+ }
+ if (min_size.y == 0)
+ edje_object_size_min_get(sd->layout, NULL, &min_size.y);
if ((min_size.y > 0) && (base_size.y < min_size.y))
base_size.y = min_size.y;
_item_sizing_eval(item);
evas_object_size_hint_min_get(VIEW(item), &_box_size.x, &_box_size.y);
+ /* Disable item size fix by edc data
str = edje_object_data_get(VIEW(item), "item_max_size");
if (str)
{
edje_object_message_signal_process(VIEW(item));
}
}
+ */
if (!sd->horizontal)
{
evas_object_geometry_get(sd->parent, &x, &y, &w, &h);
evas_object_move(sd->bg, x, y);
evas_object_resize(sd->bg, w, h);
+
+
+ // resize item and set ellipsis state (only vertical mode)
+ if (!sd->horizontal)
+ {
+ edje_object_part_geometry_get(wd->resize_obj, "elm.swallow.content", NULL, NULL, &w, NULL);
+
+ EINA_LIST_FOREACH(sd->items, elist, item)
+ {
+ evas_object_size_hint_min_get(VIEW(item), &_box_size.x, &_box_size.y);
+
+ if (_box_size.x > w)
+ {
+ evas_object_size_hint_min_set(VIEW(item), w, _box_size.y);
+ edje_object_signal_emit(VIEW(item), "elm,state,text,ellipsis", "elm");
+ edje_object_message_signal_process(VIEW(item));
+ }
+ }
+ }
}
static void
}
static void
+_size_hints_changed_cb(void *data EINA_UNUSED,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ ELM_CTXPOPUP_DATA_GET(obj, sd);
+
+ if (sd->visible) elm_layout_sizing_eval(obj);
+}
+
+static void
_hide_finished_cb(void *data,
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _on_show, NULL);
evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _on_hide, NULL);
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _on_move, NULL);
+ evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb, NULL);
_mirrored_set(obj, elm_widget_mirrored_get(obj));