efl: Use Eina.Size2D for size hint combined min
For this patch I decided to add a pseudo legacy wrapper as the function is called in a very large number of places. Fixing all those calls to use the size2d form is a lot of work and a greater risk of b0rking something.
This commit is contained in:
parent
7d2b4b6916
commit
a72f3ec64e
|
@ -182,13 +182,10 @@ _custom_layout_update(Eo *pack, const void *data EINA_UNUSED)
|
||||||
EINA_ITERATOR_FOREACH(it, sobj)
|
EINA_ITERATOR_FOREACH(it, sobj)
|
||||||
{
|
{
|
||||||
Eina_Rect r;
|
Eina_Rect r;
|
||||||
int mw, mh;
|
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(sobj, &mw, &mh);
|
|
||||||
r.x = (rp.w / count) * i;
|
r.x = (rp.w / count) * i;
|
||||||
r.y = (rp.h / count) * i;
|
r.y = (rp.h / count) * i;
|
||||||
r.w = mw;
|
r.size = efl_gfx_size_hint_combined_min_get(sobj);
|
||||||
r.h = mh;
|
|
||||||
efl_gfx_geometry_set(sobj, r);
|
efl_gfx_geometry_set(sobj, r);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,9 +151,9 @@ _custom_layout_update(Eo *pack, void *_pd EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Eina_Rect m;
|
Eina_Rect m;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(item, &m.w, &m.h);
|
|
||||||
m.x = g.x + c * g.w / cols + (cs * g.w / cols - m.w) / 2;
|
m.x = g.x + c * g.w / cols + (cs * g.w / cols - m.w) / 2;
|
||||||
m.y = g.y + r * g.h / rows + (rs * g.h / rows - m.h) / 2;
|
m.y = g.y + r * g.h / rows + (rs * g.h / rows - m.h) / 2;
|
||||||
|
m.size = efl_gfx_size_hint_combined_min_get(item);
|
||||||
efl_gfx_geometry_set(item, m);
|
efl_gfx_geometry_set(item, m);
|
||||||
|
|
||||||
gmw = MAX(gmw, m.w);
|
gmw = MAX(gmw, m.w);
|
||||||
|
|
|
@ -52,13 +52,12 @@ _bt2_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_
|
||||||
static void
|
static void
|
||||||
_size_update(void *data, const Efl_Event *ev)
|
_size_update(void *data, const Efl_Event *ev)
|
||||||
{
|
{
|
||||||
int wc, hc;
|
Eina_Size2D sz, max, min, cmin;
|
||||||
Eina_Size2D sz, max, min;
|
|
||||||
char buf[2048];
|
char buf[2048];
|
||||||
Eo *dia = ev->object;
|
Eo *dia = ev->object;
|
||||||
Eo *lbl = data;
|
Eo *lbl = data;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(dia, &wc, &hc);
|
cmin = efl_gfx_size_hint_combined_min_get(dia);
|
||||||
min = efl_gfx_size_hint_min_get(dia);
|
min = efl_gfx_size_hint_min_get(dia);
|
||||||
max = efl_gfx_size_hint_max_get(dia);
|
max = efl_gfx_size_hint_max_get(dia);
|
||||||
sz = efl_gfx_size_get(dia);
|
sz = efl_gfx_size_get(dia);
|
||||||
|
@ -66,7 +65,7 @@ _size_update(void *data, const Efl_Event *ev)
|
||||||
sprintf(buf, "This is a dialog with min/max size<br>"
|
sprintf(buf, "This is a dialog with min/max size<br>"
|
||||||
"Min size: %dx%d (requested) %dx%d (effective)<br>"
|
"Min size: %dx%d (requested) %dx%d (effective)<br>"
|
||||||
"Max size: %dx%d<br>"
|
"Max size: %dx%d<br>"
|
||||||
"Current size: %dx%d", min.w, min.h, wc, hc, max.w, max.h, sz.w, sz.h);
|
"Current size: %dx%d", min.w, min.h, cmin.w, cmin.h, max.w, max.h, sz.w, sz.h);
|
||||||
//efl_text_set(lbl, buf);
|
//efl_text_set(lbl, buf);
|
||||||
elm_object_text_set(lbl, buf);
|
elm_object_text_set(lbl, buf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,15 +112,16 @@ static void
|
||||||
_print_rect_stats(Evas_Object *rect)
|
_print_rect_stats(Evas_Object *rect)
|
||||||
{
|
{
|
||||||
Evas_Coord w, h, l, r, t, b;
|
Evas_Coord w, h, l, r, t, b;
|
||||||
|
Eina_Size2D cmin;
|
||||||
double x, y;
|
double x, y;
|
||||||
|
|
||||||
evas_object_size_hint_align_get(rect, &x, &y);
|
evas_object_size_hint_align_get(rect, &x, &y);
|
||||||
printf("\talign hints: h(%f), v(%f)\n",
|
printf("\talign hints: h(%f), v(%f)\n",
|
||||||
x, y);
|
x, y);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(rect, &w, &h);
|
cmin = efl_gfx_size_hint_combined_min_get(rect);
|
||||||
printf("\tmin. size hints: h(%d), v(%d)\n",
|
printf("\tmin. size hints: h(%d), v(%d)\n",
|
||||||
w, h);
|
cmin.w, cmin.h);
|
||||||
|
|
||||||
evas_object_size_hint_max_get(rect, &w, &h);
|
evas_object_size_hint_max_get(rect, &w, &h);
|
||||||
printf("\tmax. size hints: h(%d), v(%d)\n",
|
printf("\tmax. size hints: h(%d), v(%d)\n",
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include "Ecore_Evas.h"
|
#include "Ecore_Evas.h"
|
||||||
#include "ecore_evas_private.h"
|
#include "ecore_evas_private.h"
|
||||||
|
#include "Evas_Internal.h"
|
||||||
|
|
||||||
static const char ASSOCIATE_KEY[] = "__Ecore_Evas_Associate";
|
static const char ASSOCIATE_KEY[] = "__Ecore_Evas_Associate";
|
||||||
|
|
||||||
|
@ -132,7 +133,7 @@ _ecore_evas_object_callback_changed_size_hints(void *data, Evas *e EINA_UNUSED,
|
||||||
Ecore_Evas *ee = data;
|
Ecore_Evas *ee = data;
|
||||||
Evas_Coord w, h;
|
Evas_Coord w, h;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(obj, &w, &h);
|
evas_object_size_hint_combined_min_get(obj, &w, &h);
|
||||||
ecore_evas_size_min_set(ee, w, h);
|
ecore_evas_size_min_set(ee, w, h);
|
||||||
|
|
||||||
evas_object_size_hint_max_get(obj, &w, &h);
|
evas_object_size_hint_max_get(obj, &w, &h);
|
||||||
|
|
|
@ -212,7 +212,7 @@ _edje_box_recalc_apply(Edje *ed EINA_UNUSED, Edje_Real_Part *ep, Edje_Calc_Param
|
||||||
evas_object_smart_calculate(ep->object);
|
evas_object_smart_calculate(ep->object);
|
||||||
}
|
}
|
||||||
#if 0 /* Why the hell do we affect part size after resize ??? */
|
#if 0 /* Why the hell do we affect part size after resize ??? */
|
||||||
efl_gfx_size_hint_combined_min_get(ep->object, &min_w, &min_h);
|
evas_object_size_hint_combined_min_get(ep->object, &min_w, &min_h);
|
||||||
if (chosen_desc->box.min.h && (p3->w < min_w))
|
if (chosen_desc->box.min.h && (p3->w < min_w))
|
||||||
p3->w = min_w;
|
p3->w = min_w;
|
||||||
if (chosen_desc->box.min.v && (p3->h < min_h))
|
if (chosen_desc->box.min.v && (p3->h < min_h))
|
||||||
|
|
|
@ -1424,7 +1424,7 @@ _edje_lua_object_get_size_hint_min(lua_State *L)
|
||||||
{
|
{
|
||||||
Edje_Lua_Evas_Object *obj = _edje_lua_checkudata(L, 1, &mObject);
|
Edje_Lua_Evas_Object *obj = _edje_lua_checkudata(L, 1, &mObject);
|
||||||
int w, h;
|
int w, h;
|
||||||
efl_gfx_size_hint_combined_min_get(obj->eo, &w, &h);
|
evas_object_size_hint_combined_min_get(obj->eo, &w, &h);
|
||||||
lua_createtable(L, 2, 0);
|
lua_createtable(L, 2, 0);
|
||||||
lua_pushnumber(L, w);
|
lua_pushnumber(L, w);
|
||||||
lua_rawseti(L, -2, 1);
|
lua_rawseti(L, -2, 1);
|
||||||
|
|
|
@ -5507,7 +5507,7 @@ _edje_real_part_swallow_hints_update(Edje_Real_Part *rp)
|
||||||
Evas_Coord w1 = 0, h1 = 0, w2 = 0, h2 = 0, aw = 0, ah = 0;
|
Evas_Coord w1 = 0, h1 = 0, w2 = 0, h2 = 0, aw = 0, ah = 0;
|
||||||
Evas_Aspect_Control am = EVAS_ASPECT_CONTROL_NONE;
|
Evas_Aspect_Control am = EVAS_ASPECT_CONTROL_NONE;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(rp->typedata.swallow->swallowed_object, &w1, &h1);
|
evas_object_size_hint_combined_min_get(rp->typedata.swallow->swallowed_object, &w1, &h1);
|
||||||
evas_object_size_hint_max_get(rp->typedata.swallow->swallowed_object, &w2, &h2);
|
evas_object_size_hint_max_get(rp->typedata.swallow->swallowed_object, &w2, &h2);
|
||||||
evas_object_size_hint_aspect_get(rp->typedata.swallow->swallowed_object, &am, &aw, &ah);
|
evas_object_size_hint_aspect_get(rp->typedata.swallow->swallowed_object, &am, &aw, &ah);
|
||||||
rp->typedata.swallow->swallow_params.min.w = w1;
|
rp->typedata.swallow->swallow_params.min.w = w1;
|
||||||
|
|
|
@ -148,8 +148,7 @@ interface Efl.Gfx.Size.Hint
|
||||||
]]
|
]]
|
||||||
get {}
|
get {}
|
||||||
values {
|
values {
|
||||||
w: int; [[Integer to use as the minimum width hint.]]
|
sz: Eina.Size2D; [[Minimum size (hint) in pixels.]]
|
||||||
h: int; [[Integer to use as the minimum height hint.]]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property hint_margin {
|
@property hint_margin {
|
||||||
|
|
|
@ -112,7 +112,7 @@ _sizing_eval(Evas_Object *obj, Efl_Ui_Box_Data *sd)
|
||||||
if (sd->delete_me)
|
if (sd->delete_me)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
|
evas_object_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
|
||||||
evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh);
|
evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh);
|
||||||
evas_object_size_hint_min_set(obj, minw, minh);
|
evas_object_size_hint_min_set(obj, minw, minh);
|
||||||
evas_object_size_hint_max_set(obj, maxw, maxh);
|
evas_object_size_hint_max_set(obj, maxw, maxh);
|
||||||
|
|
|
@ -12,9 +12,8 @@ struct _Item_Calc
|
||||||
Evas_Object *obj;
|
Evas_Object *obj;
|
||||||
double weight[2];
|
double weight[2];
|
||||||
double align[2];
|
double align[2];
|
||||||
Eina_Size2D max;
|
Eina_Size2D max, want;
|
||||||
int pad[4];
|
int pad[4];
|
||||||
int want[2];
|
|
||||||
Efl_Gfx_Size_Hint_Aspect aspect_type;
|
Efl_Gfx_Size_Hint_Aspect aspect_type;
|
||||||
int aspect[2];
|
int aspect[2];
|
||||||
int id;
|
int id;
|
||||||
|
@ -79,7 +78,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
||||||
efl_gfx_size_hint_align_get(o, &item->align[0], &item->align[1]);
|
efl_gfx_size_hint_align_get(o, &item->align[0], &item->align[1]);
|
||||||
efl_gfx_size_hint_margin_get(o, &item->pad[0], &item->pad[1], &item->pad[2], &item->pad[3]);
|
efl_gfx_size_hint_margin_get(o, &item->pad[0], &item->pad[1], &item->pad[2], &item->pad[3]);
|
||||||
item->max = efl_gfx_size_hint_max_get(o);
|
item->max = efl_gfx_size_hint_max_get(o);
|
||||||
efl_gfx_size_hint_combined_min_get(o, &item->want[0], &item->want[1]);
|
item->want = efl_gfx_size_hint_combined_min_get(o);
|
||||||
efl_gfx_size_hint_aspect_get(o, &item->aspect_type, &item->aspect[0], &item->aspect[1]);
|
efl_gfx_size_hint_aspect_get(o, &item->aspect_type, &item->aspect[0], &item->aspect[1]);
|
||||||
|
|
||||||
if (item->aspect[0] <= 0 || item->aspect[1] <= 0)
|
if (item->aspect[0] <= 0 || item->aspect[1] <= 0)
|
||||||
|
@ -94,11 +93,11 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
||||||
{
|
{
|
||||||
double w, h;
|
double w, h;
|
||||||
|
|
||||||
w = item->want[0];
|
w = item->want.w;
|
||||||
h = w * item->aspect[1] / item->aspect[0];
|
h = w * item->aspect[1] / item->aspect[0];
|
||||||
if (h < item->want[1])
|
if (h < item->want.h)
|
||||||
{
|
{
|
||||||
h = item->want[1];
|
h = item->want.h;
|
||||||
w = h * item->aspect[0] / item->aspect[1];
|
w = h * item->aspect[0] / item->aspect[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,8 +123,8 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
||||||
h = item->max.h > 0 ? MIN(h1, item->max.h) : h1;
|
h = item->max.h > 0 ? MIN(h1, item->max.h) : h1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
item->want[0] = w;
|
item->want.w = w;
|
||||||
item->want[1] = h;
|
item->want.h = h;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item->weight[0] < 0) item->weight[0] = 0;
|
if (item->weight[0] < 0) item->weight[0] = 0;
|
||||||
|
@ -136,30 +135,30 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
||||||
if (item->align[0] > 1) item->align[0] = 1;
|
if (item->align[0] > 1) item->align[0] = 1;
|
||||||
if (item->align[1] > 1) item->align[1] = 1;
|
if (item->align[1] > 1) item->align[1] = 1;
|
||||||
|
|
||||||
if (item->want[0] < 0) item->want[0] = 0;
|
if (item->want.w < 0) item->want.w = 0;
|
||||||
if (item->want[1] < 0) item->want[1] = 0;
|
if (item->want.h < 0) item->want.h = 0;
|
||||||
|
|
||||||
if (item->max.w < 0) item->max.w = INT_MAX;
|
if (item->max.w < 0) item->max.w = INT_MAX;
|
||||||
if (item->max.h < 0) item->max.h = INT_MAX;
|
if (item->max.h < 0) item->max.h = INT_MAX;
|
||||||
if (item->max.w < item->want[0]) item->max.w = item->want[0];
|
if (item->max.w < item->want.w) item->max.w = item->want.w;
|
||||||
if (item->max.h < item->want[1]) item->max.h = item->want[1];
|
if (item->max.h < item->want.h) item->max.h = item->want.h;
|
||||||
|
|
||||||
item->want[0] += item->pad[0] + item->pad[1];
|
item->want.w += item->pad[0] + item->pad[1];
|
||||||
item->want[1] += item->pad[2] + item->pad[3];
|
item->want.h += item->pad[2] + item->pad[3];
|
||||||
|
|
||||||
weight[0] += item->weight[0];
|
weight[0] += item->weight[0];
|
||||||
weight[1] += item->weight[1];
|
weight[1] += item->weight[1];
|
||||||
if (horiz)
|
if (horiz)
|
||||||
{
|
{
|
||||||
wantw += item->want[0];
|
wantw += item->want.w;
|
||||||
if (item->want[1] > wanth)
|
if (item->want.h > wanth)
|
||||||
wanth = item->want[1];
|
wanth = item->want.h;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wanth += item->want[1];
|
wanth += item->want.h;
|
||||||
if (item->want[0] > wantw)
|
if (item->want.w > wantw)
|
||||||
wantw = item->want[0];
|
wantw = item->want.w;
|
||||||
}
|
}
|
||||||
|
|
||||||
item->id = id++;
|
item->id = id++;
|
||||||
|
@ -234,7 +233,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
||||||
{
|
{
|
||||||
cx = boxx + cur_pos;
|
cx = boxx + cur_pos;
|
||||||
cy = boxy;
|
cy = boxy;
|
||||||
cw = item->want[0] + rounding + (zeroweight ? 1.0 : item->weight[0]) * extra / weight[0];
|
cw = item->want.w + rounding + (zeroweight ? 1.0 : item->weight[0]) * extra / weight[0];
|
||||||
ch = boxh;
|
ch = boxh;
|
||||||
cur_pos += cw + pad;
|
cur_pos += cw + pad;
|
||||||
}
|
}
|
||||||
|
@ -243,7 +242,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
||||||
cx = boxx;
|
cx = boxx;
|
||||||
cy = boxy + cur_pos;
|
cy = boxy + cur_pos;
|
||||||
cw = boxw;
|
cw = boxw;
|
||||||
ch = item->want[1] + rounding + (zeroweight ? 1.0 : item->weight[1]) * extra / weight[1];
|
ch = item->want.h + rounding + (zeroweight ? 1.0 : item->weight[1]) * extra / weight[1];
|
||||||
cur_pos += ch + pad;
|
cur_pos += ch + pad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,10 +250,10 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
||||||
{
|
{
|
||||||
if (horiz)
|
if (horiz)
|
||||||
{
|
{
|
||||||
w = item->want[0];
|
w = item->want.w;
|
||||||
h = item->want[1];
|
h = item->want.h;
|
||||||
if (weight[0] > 0)
|
if (weight[0] > 0)
|
||||||
w = item->want[0] + extra * item->weight[0] / weight[0];
|
w = item->want.w + extra * item->weight[0] / weight[0];
|
||||||
h = w * item->aspect[1] / item->aspect[0];
|
h = w * item->aspect[1] / item->aspect[0];
|
||||||
|
|
||||||
if (item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_BOTH ||
|
if (item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_BOTH ||
|
||||||
|
@ -269,10 +268,10 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
w = item->want[0];
|
w = item->want.w;
|
||||||
h = item->want[1];
|
h = item->want.h;
|
||||||
if (weight[1] > 0)
|
if (weight[1] > 0)
|
||||||
h = item->want[1] + extra * item->weight[1] / weight[1];
|
h = item->want.h + extra * item->weight[1] / weight[1];
|
||||||
w = h * item->aspect[0] / item->aspect[1];
|
w = h * item->aspect[0] / item->aspect[1];
|
||||||
|
|
||||||
if (item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_BOTH ||
|
if (item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_BOTH ||
|
||||||
|
@ -310,12 +309,12 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
||||||
}
|
}
|
||||||
else if (item->max.w != INT_MAX)
|
else if (item->max.w != INT_MAX)
|
||||||
{
|
{
|
||||||
w = MIN(w, MAX(item->want[0], item->max.w));
|
w = MIN(w, MAX(item->want.w, item->max.w));
|
||||||
h = w * item->aspect[1] / item->aspect[0];
|
h = w * item->aspect[1] / item->aspect[0];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
h = MIN(h, MAX(item->want[1], item->max.h));
|
h = MIN(h, MAX(item->want.h, item->max.h));
|
||||||
w = h * item->aspect[0] / item->aspect[1];
|
w = h * item->aspect[0] / item->aspect[1];
|
||||||
}
|
}
|
||||||
w = w - item->pad[0] - item->pad[1];
|
w = w - item->pad[0] - item->pad[1];
|
||||||
|
@ -336,7 +335,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
||||||
// horizontally
|
// horizontally
|
||||||
if (item->max.w < INT_MAX)
|
if (item->max.w < INT_MAX)
|
||||||
{
|
{
|
||||||
w = MIN(MAX(item->want[0] - item->pad[0] - item->pad[1], item->max.w), cw);
|
w = MIN(MAX(item->want.w - item->pad[0] - item->pad[1], item->max.w), cw);
|
||||||
if (item->align[0] < 0)
|
if (item->align[0] < 0)
|
||||||
{
|
{
|
||||||
// bad case: fill+max are not good together
|
// bad case: fill+max are not good together
|
||||||
|
@ -356,14 +355,14 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
||||||
if (horiz && item->weight[0] > 0)
|
if (horiz && item->weight[0] > 0)
|
||||||
w = cw - item->pad[0] - item->pad[1];
|
w = cw - item->pad[0] - item->pad[1];
|
||||||
else
|
else
|
||||||
w = item->want[0] - item->pad[0] - item->pad[1];
|
w = item->want.w - item->pad[0] - item->pad[1];
|
||||||
x = cx + ((cw - w) * item->align[0]) + item->pad[0];
|
x = cx + ((cw - w) * item->align[0]) + item->pad[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertically
|
// vertically
|
||||||
if (item->max.h < INT_MAX)
|
if (item->max.h < INT_MAX)
|
||||||
{
|
{
|
||||||
h = MIN(MAX(item->want[1] - item->pad[2] - item->pad[3], item->max.h), ch);
|
h = MIN(MAX(item->want.h - item->pad[2] - item->pad[3], item->max.h), ch);
|
||||||
if (item->align[1] < 0)
|
if (item->align[1] < 0)
|
||||||
{
|
{
|
||||||
// bad case: fill+max are not good together
|
// bad case: fill+max are not good together
|
||||||
|
@ -383,7 +382,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
||||||
if (!horiz && item->weight[1] > 0)
|
if (!horiz && item->weight[1] > 0)
|
||||||
h = ch - item->pad[2] - item->pad[3];
|
h = ch - item->pad[2] - item->pad[3];
|
||||||
else
|
else
|
||||||
h = item->want[1] - item->pad[2] - item->pad[3];
|
h = item->want.h - item->pad[2] - item->pad[3];
|
||||||
y = cy + ((ch - h) * item->align[1]) + item->pad[2];
|
y = cy + ((ch - h) * item->align[1]) + item->pad[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ _efl_ui_box_stack_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Evas_Object_Box_Option *opt;
|
Evas_Object_Box_Option *opt;
|
||||||
Evas_Object_Box_Data *bd;
|
Evas_Object_Box_Data *bd;
|
||||||
Eina_Size2D min = { 0, 0 };
|
Eina_Size2D min = { 0, 0 }, cmin;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(obj, EFL_UI_BOX_CLASS));
|
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(obj, EFL_UI_BOX_CLASS));
|
||||||
|
@ -24,11 +24,10 @@ _efl_ui_box_stack_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED)
|
||||||
EINA_LIST_FOREACH(bd->children, l, opt)
|
EINA_LIST_FOREACH(bd->children, l, opt)
|
||||||
{
|
{
|
||||||
Evas_Object *child = opt->obj;
|
Evas_Object *child = opt->obj;
|
||||||
int mw = 0, mh = 0;
|
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(child, &mw, &mh);
|
cmin = efl_gfx_size_hint_combined_min_get(child);
|
||||||
if (mw > min.w) min.w = mw;
|
if (cmin.w > min.w) min.w = cmin.w;
|
||||||
if (mh > min.h) min.h = mh;
|
if (cmin.h > min.h) min.h = cmin.h;
|
||||||
}
|
}
|
||||||
efl_gfx_size_hint_restricted_min_set(obj, min);
|
efl_gfx_size_hint_restricted_min_set(obj, min);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,9 +73,9 @@ _sizing_eval(Evas_Object *obj)
|
||||||
EFL_UI_FLIP_DATA_GET(obj, sd);
|
EFL_UI_FLIP_DATA_GET(obj, sd);
|
||||||
|
|
||||||
if (sd->front.content)
|
if (sd->front.content)
|
||||||
efl_gfx_size_hint_combined_min_get(sd->front.content, &minw, &minh);
|
evas_object_size_hint_combined_min_get(sd->front.content, &minw, &minh);
|
||||||
if (sd->back.content)
|
if (sd->back.content)
|
||||||
efl_gfx_size_hint_combined_min_get(sd->back.content, &minw2, &minh2);
|
evas_object_size_hint_combined_min_get(sd->back.content, &minw2, &minh2);
|
||||||
if (sd->front.content)
|
if (sd->front.content)
|
||||||
evas_object_size_hint_max_get(sd->front.content, &maxw, &maxh);
|
evas_object_size_hint_max_get(sd->front.content, &maxw, &maxh);
|
||||||
if (sd->back.content)
|
if (sd->back.content)
|
||||||
|
|
|
@ -138,7 +138,7 @@ _sizing_eval(Evas_Object *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
|
||||||
|
|
||||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
|
evas_object_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
|
||||||
evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh);
|
evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh);
|
||||||
evas_object_size_hint_min_set(obj, minw, minh);
|
evas_object_size_hint_min_set(obj, minw, minh);
|
||||||
evas_object_size_hint_max_set(obj, maxw, maxh);
|
evas_object_size_hint_max_set(obj, maxw, maxh);
|
||||||
|
|
|
@ -767,7 +767,7 @@ _efl_ui_image_sizing_eval(Evas_Object *obj)
|
||||||
efl_gfx_view_size_get(obj, &w, &h);
|
efl_gfx_view_size_get(obj, &w, &h);
|
||||||
|
|
||||||
sd->scale = ts;
|
sd->scale = ts;
|
||||||
efl_gfx_size_hint_combined_min_get(obj, &minw, &minh);
|
evas_object_size_hint_combined_min_get(obj, &minw, &minh);
|
||||||
|
|
||||||
if (sd->no_scale)
|
if (sd->no_scale)
|
||||||
{
|
{
|
||||||
|
@ -1171,7 +1171,10 @@ _efl_ui_image_efl_canvas_layout_group_group_size_min_get(Eo *obj EINA_UNUSED, Ef
|
||||||
if (sd->edje)
|
if (sd->edje)
|
||||||
edje_object_size_min_get(sd->img, w, h);
|
edje_object_size_min_get(sd->img, w, h);
|
||||||
else
|
else
|
||||||
efl_gfx_size_hint_combined_min_get(sd->img, w, h);
|
{
|
||||||
|
if (w) *w = 0;
|
||||||
|
if (h) *h = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
|
@ -1180,7 +1183,10 @@ _efl_ui_image_efl_canvas_layout_group_group_size_max_get(Eo *obj EINA_UNUSED, Ef
|
||||||
if (sd->edje)
|
if (sd->edje)
|
||||||
edje_object_size_max_get(sd->img, w, h);
|
edje_object_size_max_get(sd->img, w, h);
|
||||||
else
|
else
|
||||||
evas_object_size_hint_max_get(sd->img, w, h);
|
{
|
||||||
|
if (w) *w = 0;
|
||||||
|
if (h) *h = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
|
@ -1196,7 +1202,7 @@ _efl_ui_image_efl_canvas_layout_calc_calc_size_min(Eo *obj EINA_UNUSED, Efl_Ui_I
|
||||||
if (sd->edje)
|
if (sd->edje)
|
||||||
edje_object_size_min_calc(sd->img, w, h);
|
edje_object_size_min_calc(sd->img, w, h);
|
||||||
else
|
else
|
||||||
efl_gfx_size_hint_combined_min_get(sd->img, w, h);
|
evas_object_size_hint_combined_min_get(sd->img, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
|
|
|
@ -1558,7 +1558,10 @@ _efl_ui_image_zoomable_efl_canvas_layout_group_group_size_min_get(Eo *obj EINA_U
|
||||||
if (sd->edje)
|
if (sd->edje)
|
||||||
edje_object_size_min_get(sd->edje, w, h);
|
edje_object_size_min_get(sd->edje, w, h);
|
||||||
else
|
else
|
||||||
efl_gfx_size_hint_combined_min_get(sd->img, w, h);
|
{
|
||||||
|
if (w) *w = 0;
|
||||||
|
if (h) *h = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
|
@ -1567,7 +1570,10 @@ _efl_ui_image_zoomable_efl_canvas_layout_group_group_size_max_get(Eo *obj EINA_U
|
||||||
if (sd->edje)
|
if (sd->edje)
|
||||||
edje_object_size_max_get(sd->edje, w, h);
|
edje_object_size_max_get(sd->edje, w, h);
|
||||||
else
|
else
|
||||||
evas_object_size_hint_max_get(sd->img, w, h);
|
{
|
||||||
|
if (w) *w = 0;
|
||||||
|
if (h) *h = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
|
|
|
@ -193,7 +193,7 @@ _efl_ui_panes_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Panes_Data *sd)
|
||||||
if (first_content)
|
if (first_content)
|
||||||
{
|
{
|
||||||
if (!sd->first_hint_min_allow)
|
if (!sd->first_hint_min_allow)
|
||||||
efl_gfx_size_hint_combined_min_get(first_content, &sd->first_min.w, &sd->first_min.h);
|
sd->first_min = efl_gfx_size_hint_combined_min_get(first_content);
|
||||||
else
|
else
|
||||||
sd->first_min = efl_gfx_size_hint_min_get(first_content);
|
sd->first_min = efl_gfx_size_hint_min_get(first_content);
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ _efl_ui_panes_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Panes_Data *sd)
|
||||||
if (second_content)
|
if (second_content)
|
||||||
{
|
{
|
||||||
if (!sd->second_hint_min_allow)
|
if (!sd->second_hint_min_allow)
|
||||||
efl_gfx_size_hint_combined_min_get(second_content, &sd->second_min.w, &sd->second_min.h);
|
sd->second_min = efl_gfx_size_hint_combined_min_get(second_content);
|
||||||
else
|
else
|
||||||
sd->second_min = efl_gfx_size_hint_min_get(second_content);
|
sd->second_min = efl_gfx_size_hint_min_get(second_content);
|
||||||
}
|
}
|
||||||
|
|
|
@ -852,15 +852,14 @@ _elm_win_obj_intercept_layer_set(void *data, Evas_Object *obj EINA_UNUSED, int l
|
||||||
static void
|
static void
|
||||||
_elm_win_size_hints_update(Efl_Ui_Win *win, Efl_Ui_Win_Data *sd)
|
_elm_win_size_hints_update(Efl_Ui_Win *win, Efl_Ui_Win_Data *sd)
|
||||||
{
|
{
|
||||||
Evas_Coord minw, minh;
|
Eina_Size2D min, max;
|
||||||
Eina_Size2D max;
|
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(win, &minw, &minh);
|
min = efl_gfx_size_hint_combined_min_get(win);
|
||||||
max = efl_gfx_size_hint_max_get(win);
|
max = efl_gfx_size_hint_max_get(win);
|
||||||
if (max.w < 1) max.w = -1;
|
if (max.w < 1) max.w = -1;
|
||||||
if (max.h < 1) max.h = -1;
|
if (max.h < 1) max.h = -1;
|
||||||
|
|
||||||
TRAP(sd, size_min_set, minw, minh);
|
TRAP(sd, size_min_set, min.w, min.h);
|
||||||
TRAP(sd, size_max_set, max.w, max.h);
|
TRAP(sd, size_max_set, max.w, max.h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3453,7 +3452,7 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize)
|
||||||
Eina_Bool unresizable;
|
Eina_Bool unresizable;
|
||||||
double wx, wy;
|
double wx, wy;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(sd->legacy.edje, &minw, &minh);
|
evas_object_size_hint_combined_min_get(sd->legacy.edje, &minw, &minh);
|
||||||
if ((!minw) && (!minh)) return;
|
if ((!minw) && (!minh)) return;
|
||||||
|
|
||||||
// If content has a weight, make resizable
|
// If content has a weight, make resizable
|
||||||
|
@ -8065,7 +8064,7 @@ _window_layout_stack(Evas_Object *o, Evas_Object_Box_Data *p, void *data)
|
||||||
|
|
||||||
ELM_WIN_DATA_GET(data, sd);
|
ELM_WIN_DATA_GET(data, sd);
|
||||||
if (sd->main_menu && efl_gfx_visible_get(sd->main_menu))
|
if (sd->main_menu && efl_gfx_visible_get(sd->main_menu))
|
||||||
efl_gfx_size_hint_combined_min_get(sd->main_menu, &menuw, NULL);
|
evas_object_size_hint_combined_min_get(sd->main_menu, &menuw, NULL);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(p->children, l, opt)
|
EINA_LIST_FOREACH(p->children, l, opt)
|
||||||
{
|
{
|
||||||
|
@ -8074,7 +8073,7 @@ _window_layout_stack(Evas_Object *o, Evas_Object_Box_Data *p, void *data)
|
||||||
if (EINA_DBL_EQ(wx, 0.0)) weight_x = 0;
|
if (EINA_DBL_EQ(wx, 0.0)) weight_x = 0;
|
||||||
if (EINA_DBL_EQ(wy, 0.0)) weight_y = 0;
|
if (EINA_DBL_EQ(wy, 0.0)) weight_y = 0;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(child, &w, &h);
|
evas_object_size_hint_combined_min_get(child, &w, &h);
|
||||||
if (w > minw) minw = w;
|
if (w > minw) minw = w;
|
||||||
if (h > minh) minh = h;
|
if (h > minh) minh = h;
|
||||||
}
|
}
|
||||||
|
|
|
@ -227,7 +227,7 @@ _base_geometry_calc(Evas_Object *obj,
|
||||||
if ((max_size.x > 0) && (base_size.x > max_size.x))
|
if ((max_size.x > 0) && (base_size.x > max_size.x))
|
||||||
base_size.x = max_size.x;
|
base_size.x = max_size.x;
|
||||||
//Limit to Min Size
|
//Limit to Min Size
|
||||||
efl_gfx_size_hint_combined_min_get(obj, &min_size.x, &min_size.y);
|
evas_object_size_hint_combined_min_get(obj, &min_size.x, &min_size.y);
|
||||||
|
|
||||||
if ((min_size.y > 0) && (base_size.y < min_size.y))
|
if ((min_size.y > 0) && (base_size.y < min_size.y))
|
||||||
base_size.y = min_size.y;
|
base_size.y = min_size.y;
|
||||||
|
|
|
@ -253,7 +253,7 @@ _sizing_eval(void *data)
|
||||||
edje_object_message_signal_process(elm_layout_edje_get(sd->hover));
|
edje_object_message_signal_process(elm_layout_edje_get(sd->hover));
|
||||||
|
|
||||||
elm_box_recalculate(sd->bx);
|
elm_box_recalculate(sd->bx);
|
||||||
efl_gfx_size_hint_combined_min_get(sd->bx, &box_w, &box_h);
|
evas_object_size_hint_combined_min_get(sd->bx, &box_w, &box_h);
|
||||||
|
|
||||||
max_size_str = elm_layout_data_get(sd->hover, "max_size");
|
max_size_str = elm_layout_data_get(sd->hover, "max_size");
|
||||||
if (max_size_str)
|
if (max_size_str)
|
||||||
|
|
|
@ -186,7 +186,7 @@ _shrink_mode_set(Evas_Object *obj,
|
||||||
|
|
||||||
if (shrink == EINA_TRUE)
|
if (shrink == EINA_TRUE)
|
||||||
{
|
{
|
||||||
Evas_Coord w = 0, w_tmp = 0;
|
Evas_Coord w = 0;
|
||||||
Evas_Coord box_inner_item_width_padding = 0;
|
Evas_Coord box_inner_item_width_padding = 0;
|
||||||
|
|
||||||
elm_box_padding_get(sd->box, &box_inner_item_width_padding, NULL);
|
elm_box_padding_get(sd->box, &box_inner_item_width_padding, NULL);
|
||||||
|
@ -204,8 +204,7 @@ _shrink_mode_set(Evas_Object *obj,
|
||||||
if (sd->label && sd->label_packed)
|
if (sd->label && sd->label_packed)
|
||||||
{
|
{
|
||||||
elm_box_pack_end(sd->box, sd->label);
|
elm_box_pack_end(sd->box, sd->label);
|
||||||
efl_gfx_size_hint_combined_min_get(sd->label, &w_tmp, NULL);
|
w -= efl_gfx_size_hint_combined_min_get(sd->label).w;
|
||||||
w -= w_tmp;
|
|
||||||
w -= box_inner_item_width_padding;
|
w -= box_inner_item_width_padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +213,7 @@ _shrink_mode_set(Evas_Object *obj,
|
||||||
|
|
||||||
EINA_LIST_FOREACH(sd->items, l, eo_item)
|
EINA_LIST_FOREACH(sd->items, l, eo_item)
|
||||||
{
|
{
|
||||||
Evas_Coord item_w, w_label_count = 0, h = 0;
|
Evas_Coord w_label_count = 0, h = 0;
|
||||||
char *buf;
|
char *buf;
|
||||||
|
|
||||||
ELM_MULTIBUTTONENTRY_ITEM_DATA_GET(eo_item, item);
|
ELM_MULTIBUTTONENTRY_ITEM_DATA_GET(eo_item, item);
|
||||||
|
@ -222,9 +221,7 @@ _shrink_mode_set(Evas_Object *obj,
|
||||||
evas_object_show(VIEW(item));
|
evas_object_show(VIEW(item));
|
||||||
item->visible = EINA_TRUE;
|
item->visible = EINA_TRUE;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(VIEW(item), &item_w, NULL);
|
w -= efl_gfx_size_hint_combined_min_get(VIEW(item)).w;
|
||||||
|
|
||||||
w -= item_w;
|
|
||||||
w -= box_inner_item_width_padding;
|
w -= box_inner_item_width_padding;
|
||||||
count--;
|
count--;
|
||||||
|
|
||||||
|
@ -328,7 +325,7 @@ _view_update(Elm_Multibuttonentry_Data *sd)
|
||||||
|
|
||||||
// update label
|
// update label
|
||||||
if (sd->label)
|
if (sd->label)
|
||||||
efl_gfx_size_hint_combined_min_get(sd->label, &width, &height);
|
evas_object_size_hint_combined_min_get(sd->label, &width, &height);
|
||||||
|
|
||||||
if (sd->guide_text)
|
if (sd->guide_text)
|
||||||
{
|
{
|
||||||
|
@ -829,7 +826,7 @@ _item_new(Elm_Multibuttonentry_Data *sd,
|
||||||
evas_object_show(VIEW(item));
|
evas_object_show(VIEW(item));
|
||||||
|
|
||||||
evas_object_smart_calculate(VIEW(item));
|
evas_object_smart_calculate(VIEW(item));
|
||||||
efl_gfx_size_hint_combined_min_get(VIEW(item), &minw, &minh);
|
evas_object_size_hint_combined_min_get(VIEW(item), &minw, &minh);
|
||||||
evas_object_geometry_get(sd->box, NULL, NULL, &boxw, NULL);
|
evas_object_geometry_get(sd->box, NULL, NULL, &boxw, NULL);
|
||||||
|
|
||||||
if (sd->w_box && minw > boxw)
|
if (sd->w_box && minw > boxw)
|
||||||
|
@ -1053,7 +1050,7 @@ _box_resize_cb(void *data,
|
||||||
elm_layout_sizing_eval(VIEW(it));
|
elm_layout_sizing_eval(VIEW(it));
|
||||||
evas_object_smart_calculate(VIEW(it));
|
evas_object_smart_calculate(VIEW(it));
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(VIEW(it), &mnw, &mnh);
|
evas_object_size_hint_combined_min_get(VIEW(it), &mnw, &mnh);
|
||||||
|
|
||||||
if (mnw > w - hpad)
|
if (mnw > w - hpad)
|
||||||
{
|
{
|
||||||
|
@ -1328,14 +1325,14 @@ _box_min_size_calculate(Evas_Object *box,
|
||||||
Evas_Object_Box_Option *opt;
|
Evas_Object_Box_Option *opt;
|
||||||
|
|
||||||
evas_object_geometry_get(box, NULL, NULL, &w, NULL);
|
evas_object_geometry_get(box, NULL, NULL, &w, NULL);
|
||||||
efl_gfx_size_hint_combined_min_get(box, &minw, NULL);
|
evas_object_size_hint_combined_min_get(box, &minw, NULL);
|
||||||
|
|
||||||
if (!w) return EINA_FALSE;
|
if (!w) return EINA_FALSE;
|
||||||
|
|
||||||
line_num = 1;
|
line_num = 1;
|
||||||
EINA_LIST_FOREACH(priv->children, l, opt)
|
EINA_LIST_FOREACH(priv->children, l, opt)
|
||||||
{
|
{
|
||||||
efl_gfx_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
|
evas_object_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
|
||||||
|
|
||||||
linew += mnw;
|
linew += mnw;
|
||||||
if (lineh < mnh) lineh = mnh;
|
if (lineh < mnh) lineh = mnh;
|
||||||
|
@ -1374,7 +1371,7 @@ _box_layout_cb(Evas_Object *o,
|
||||||
|
|
||||||
evas_object_geometry_get(o, &x, &y, &w, &h);
|
evas_object_geometry_get(o, &x, &y, &w, &h);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(o, &minw, &minh);
|
evas_object_size_hint_combined_min_get(o, &minw, &minh);
|
||||||
evas_object_size_hint_align_get(o, &ax, &ay);
|
evas_object_size_hint_align_get(o, &ax, &ay);
|
||||||
|
|
||||||
rtl = efl_ui_mirrored_get(data);
|
rtl = efl_ui_mirrored_get(data);
|
||||||
|
@ -1404,7 +1401,7 @@ _box_layout_cb(Evas_Object *o,
|
||||||
obj = opt->obj;
|
obj = opt->obj;
|
||||||
evas_object_size_hint_align_get(obj, &ax, &ay);
|
evas_object_size_hint_align_get(obj, &ax, &ay);
|
||||||
evas_object_size_hint_weight_get(obj, &wx, &wy);
|
evas_object_size_hint_weight_get(obj, &wx, &wy);
|
||||||
efl_gfx_size_hint_combined_min_get(obj, &mnw, &mnh);
|
evas_object_size_hint_combined_min_get(obj, &mnw, &mnh);
|
||||||
|
|
||||||
fw = fh = EINA_FALSE;
|
fw = fh = EINA_FALSE;
|
||||||
if (EINA_DBL_EQ(ax, -1)) {fw = 1; ax = 0.5; }
|
if (EINA_DBL_EQ(ax, -1)) {fw = 1; ax = 0.5; }
|
||||||
|
|
|
@ -457,14 +457,14 @@ _elm_popup_elm_layout_sizing_eval(Eo *obj, Elm_Popup_Data *sd)
|
||||||
EINA_LIST_FOREACH(sd->items, elist, it)
|
EINA_LIST_FOREACH(sd->items, elist, it)
|
||||||
{
|
{
|
||||||
_item_sizing_eval(it);
|
_item_sizing_eval(it);
|
||||||
efl_gfx_size_hint_combined_min_get(elm_layout_edje_get(VIEW(it)),
|
evas_object_size_hint_combined_min_get(elm_layout_edje_get(VIEW(it)),
|
||||||
NULL, &minh_box);
|
NULL, &minh_box);
|
||||||
if (minh_box != -1) h_box += minh_box;
|
if (minh_box != -1) h_box += minh_box;
|
||||||
}
|
}
|
||||||
evas_object_size_hint_min_set(sd->spacer, 0, MIN(h_box, sd->max_sc_h));
|
evas_object_size_hint_min_set(sd->spacer, 0, MIN(h_box, sd->max_sc_h));
|
||||||
evas_object_size_hint_max_set(sd->spacer, -1, sd->max_sc_h);
|
evas_object_size_hint_max_set(sd->spacer, -1, sd->max_sc_h);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(sd->scr, &minw, &minh);
|
evas_object_size_hint_combined_min_get(sd->scr, &minw, &minh);
|
||||||
evas_object_size_hint_max_get(sd->scr, &minw, &minh);
|
evas_object_size_hint_max_get(sd->scr, &minw, &minh);
|
||||||
}
|
}
|
||||||
else if (sd->scroll)
|
else if (sd->scroll)
|
||||||
|
|
|
@ -142,7 +142,7 @@ _sizing_eval(Evas_Object *obj)
|
||||||
|
|
||||||
if (sd->delete_me) return;
|
if (sd->delete_me) return;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
|
evas_object_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
|
||||||
evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh);
|
evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh);
|
||||||
evas_object_size_hint_min_set(obj, minw, minh);
|
evas_object_size_hint_min_set(obj, minw, minh);
|
||||||
evas_object_size_hint_max_set(obj, maxw, maxh);
|
evas_object_size_hint_max_set(obj, maxw, maxh);
|
||||||
|
|
|
@ -1468,7 +1468,7 @@ _picker_sizing_eval(Evas_Object *obj)
|
||||||
|
|
||||||
ELM_COLORSELECTOR_DATA_GET(obj, sd);
|
ELM_COLORSELECTOR_DATA_GET(obj, sd);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(sd->picker, &minw, &minh);
|
evas_object_size_hint_combined_min_get(sd->picker, &minw, &minh);
|
||||||
evas_object_size_hint_min_set(obj, minw, minh);
|
evas_object_size_hint_min_set(obj, minw, minh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1523,7 +1523,7 @@ _on_resize(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
|
||||||
{
|
{
|
||||||
Evas_Coord w = 0, h = 0, minw = -1;
|
Evas_Coord w = 0, h = 0, minw = -1;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(obj, &minw, NULL);
|
evas_object_size_hint_combined_min_get(obj, &minw, NULL);
|
||||||
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
|
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
|
||||||
if ((w != sd->_w) && (w < minw))
|
if ((w != sd->_w) && (w < minw))
|
||||||
elm_layout_sizing_eval(obj);
|
elm_layout_sizing_eval(obj);
|
||||||
|
|
|
@ -305,7 +305,7 @@ _resize_cb(void *data EINA_UNUSED,
|
||||||
if (sd->items)
|
if (sd->items)
|
||||||
{
|
{
|
||||||
Elm_Diskselector_Item_Data *it = sd->items->data;
|
Elm_Diskselector_Item_Data *it = sd->items->data;
|
||||||
efl_gfx_size_hint_combined_min_get(VIEW(it), &mw, &mh);
|
evas_object_size_hint_combined_min_get(VIEW(it), &mw, &mh);
|
||||||
}
|
}
|
||||||
if (sd->minh < mh) sd->minh = mh;
|
if (sd->minh < mh) sd->minh = mh;
|
||||||
edje_object_size_min_restricted_calc
|
edje_object_size_min_restricted_calc
|
||||||
|
|
|
@ -1042,7 +1042,7 @@ _deferred_recalc_job(void *data)
|
||||||
{
|
{
|
||||||
Evas_Coord ominw = -1;
|
Evas_Coord ominw = -1;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(data, &ominw, NULL);
|
evas_object_size_hint_combined_min_get(data, &ominw, NULL);
|
||||||
minw = ominw;
|
minw = ominw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1148,7 +1148,7 @@ _elm_entry_elm_layout_sizing_eval(Eo *obj, Elm_Entry_Data *sd)
|
||||||
{
|
{
|
||||||
Evas_Coord ominw = -1;
|
Evas_Coord ominw = -1;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(sd->entry_edje, &ominw, NULL);
|
evas_object_size_hint_combined_min_get(sd->entry_edje, &ominw, NULL);
|
||||||
minw = ominw;
|
minw = ominw;
|
||||||
}
|
}
|
||||||
sd->ent_mw = minw;
|
sd->ent_mw = minw;
|
||||||
|
@ -1388,7 +1388,7 @@ _hoversel_position(Evas_Object *obj)
|
||||||
edje_object_part_text_cursor_geometry_get
|
edje_object_part_text_cursor_geometry_get
|
||||||
(sd->entry_edje, "elm.text", &cx, &cy, &cw, &ch);
|
(sd->entry_edje, "elm.text", &cx, &cy, &cw, &ch);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(sd->hoversel, &mw, &mh);
|
evas_object_size_hint_combined_min_get(sd->hoversel, &mw, &mh);
|
||||||
if (cx + mw > w)
|
if (cx + mw > w)
|
||||||
cx = w - mw;
|
cx = w - mw;
|
||||||
if (cy + mh > h)
|
if (cy + mh > h)
|
||||||
|
@ -2132,7 +2132,7 @@ _entry_changed_handle(void *data,
|
||||||
/* Reset the size hints which are no more relevant. Keep the
|
/* Reset the size hints which are no more relevant. Keep the
|
||||||
* height, this is a hack, but doesn't really matter cause we'll
|
* height, this is a hack, but doesn't really matter cause we'll
|
||||||
* re-eval in a moment. */
|
* re-eval in a moment. */
|
||||||
efl_gfx_size_hint_combined_min_get(data, NULL, &minh);
|
evas_object_size_hint_combined_min_get(data, NULL, &minh);
|
||||||
evas_object_size_hint_min_set(data, -1, minh);
|
evas_object_size_hint_min_set(data, -1, minh);
|
||||||
|
|
||||||
elm_layout_sizing_eval(data);
|
elm_layout_sizing_eval(data);
|
||||||
|
|
|
@ -87,7 +87,7 @@ _sizing_eval(Evas_Object *obj)
|
||||||
|
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
if (!wd->content) return;
|
if (!wd->content) return;
|
||||||
efl_gfx_size_hint_combined_min_get(wd->content, &minw, &minh);
|
evas_object_size_hint_combined_min_get(wd->content, &minw, &minh);
|
||||||
evas_object_size_hint_max_get(wd->content, &maxw, &maxh);
|
evas_object_size_hint_max_get(wd->content, &maxw, &maxh);
|
||||||
if (wd->maxmin)
|
if (wd->maxmin)
|
||||||
{
|
{
|
||||||
|
|
|
@ -88,7 +88,7 @@ _elm_flipselector_elm_layout_sizing_eval(Eo *obj, Elm_Flipselector_Data *sd)
|
||||||
edje_object_size_min_restricted_calc
|
edje_object_size_min_restricted_calc
|
||||||
(wd->resize_obj, &minw, &minh, minw, minh);
|
(wd->resize_obj, &minw, &minh, minw, minh);
|
||||||
elm_coords_finger_size_adjust(1, &minw, 2, &minh);
|
elm_coords_finger_size_adjust(1, &minw, 2, &minh);
|
||||||
efl_gfx_size_hint_combined_min_get(obj, &w, &h);
|
evas_object_size_hint_combined_min_get(obj, &w, &h);
|
||||||
|
|
||||||
if (sd->sentinel)
|
if (sd->sentinel)
|
||||||
{
|
{
|
||||||
|
|
|
@ -910,7 +910,7 @@ _elm_genlist_elm_layout_sizing_eval(Eo *obj, Elm_Genlist_Data *sd)
|
||||||
|
|
||||||
if (sd->on_sub_del) return;;
|
if (sd->on_sub_del) return;;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(obj, &minw, NULL);
|
evas_object_size_hint_combined_min_get(obj, &minw, NULL);
|
||||||
evas_object_size_hint_max_get(obj, &maxw, &maxh);
|
evas_object_size_hint_max_get(obj, &maxw, &maxh);
|
||||||
|
|
||||||
edje_object_size_min_calc(wd->resize_obj, &vmw, &vmh);
|
edje_object_size_min_calc(wd->resize_obj, &vmw, &vmh);
|
||||||
|
|
|
@ -175,7 +175,7 @@ _elm_hover_smart_content_location_get(Elm_Hover_Data *sd,
|
||||||
Evas_Coord c_w = 0, c_h = 0, mid_w, mid_h;
|
Evas_Coord c_w = 0, c_h = 0, mid_w, mid_h;
|
||||||
int max;
|
int max;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(sd->smt_sub->obj, &c_w, &c_h);
|
evas_object_size_hint_combined_min_get(sd->smt_sub->obj, &c_w, &c_h);
|
||||||
mid_w = c_w / 2;
|
mid_w = c_w / 2;
|
||||||
mid_h = c_h / 2;
|
mid_h = c_h / 2;
|
||||||
|
|
||||||
|
|
|
@ -671,7 +671,7 @@ _elm_list_elm_layout_sizing_eval(Eo *obj, Elm_List_Data *sd)
|
||||||
|
|
||||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(sd->box, &minw, &minh);
|
evas_object_size_hint_combined_min_get(sd->box, &minw, &minh);
|
||||||
evas_object_size_hint_max_get(sd->box, &maxw, &maxh);
|
evas_object_size_hint_max_get(sd->box, &maxw, &maxh);
|
||||||
evas_object_size_hint_weight_get(sd->box, &xw, &yw);
|
evas_object_size_hint_weight_get(sd->box, &xw, &yw);
|
||||||
|
|
||||||
|
@ -828,13 +828,13 @@ _items_fix(Evas_Object *obj)
|
||||||
if (it->deleted) continue;
|
if (it->deleted) continue;
|
||||||
if (it->icon)
|
if (it->icon)
|
||||||
{
|
{
|
||||||
efl_gfx_size_hint_combined_min_get(it->icon, &mw, &mh);
|
evas_object_size_hint_combined_min_get(it->icon, &mw, &mh);
|
||||||
if (mw > minw[0]) minw[0] = mw;
|
if (mw > minw[0]) minw[0] = mw;
|
||||||
if (mh > minh[0]) minh[0] = mh;
|
if (mh > minh[0]) minh[0] = mh;
|
||||||
}
|
}
|
||||||
if (it->end)
|
if (it->end)
|
||||||
{
|
{
|
||||||
efl_gfx_size_hint_combined_min_get(it->end, &mw, &mh);
|
evas_object_size_hint_combined_min_get(it->end, &mw, &mh);
|
||||||
if (mw > minw[1]) minw[1] = mw;
|
if (mw > minw[1]) minw[1] = mw;
|
||||||
if (mh > minh[1]) minh[1] = mh;
|
if (mh > minh[1]) minh[1] = mh;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1484,7 +1484,7 @@ _icon_dup(Evas_Object *icon,
|
||||||
evas_object_geometry_get(icon, NULL, NULL, &w, &h);
|
evas_object_geometry_get(icon, NULL, NULL, &w, &h);
|
||||||
if (w <= 0 || h <= 0)
|
if (w <= 0 || h <= 0)
|
||||||
{
|
{
|
||||||
efl_gfx_size_hint_combined_min_get(icon, &w, &h);
|
evas_object_size_hint_combined_min_get(icon, &w, &h);
|
||||||
evas_object_size_hint_min_set(dupp, w, h);
|
evas_object_size_hint_min_set(dupp, w, h);
|
||||||
}
|
}
|
||||||
else evas_object_resize(dupp, w, h);
|
else evas_object_resize(dupp, w, h);
|
||||||
|
@ -1535,7 +1535,7 @@ _overlay_default_show(Overlay_Default *ovl)
|
||||||
{
|
{
|
||||||
disp = ovl->content;
|
disp = ovl->content;
|
||||||
evas_object_geometry_get(disp, NULL, NULL, &w, &h);
|
evas_object_geometry_get(disp, NULL, NULL, &w, &h);
|
||||||
if (w <= 0 || h <= 0) efl_gfx_size_hint_combined_min_get(disp, &w, &h);
|
if (w <= 0 || h <= 0) evas_object_size_hint_combined_min_get(disp, &w, &h);
|
||||||
ovl->w = w;
|
ovl->w = w;
|
||||||
ovl->h = h;
|
ovl->h = h;
|
||||||
}
|
}
|
||||||
|
@ -1544,7 +1544,7 @@ _overlay_default_show(Overlay_Default *ovl)
|
||||||
disp = ovl->clas_content;
|
disp = ovl->clas_content;
|
||||||
|
|
||||||
evas_object_geometry_get(disp, NULL, NULL, &w, &h);
|
evas_object_geometry_get(disp, NULL, NULL, &w, &h);
|
||||||
if (w <= 0 || h <= 0) efl_gfx_size_hint_combined_min_get(disp, &w, &h);
|
if (w <= 0 || h <= 0) evas_object_size_hint_combined_min_get(disp, &w, &h);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ _sizing_eval(Evas_Object *obj)
|
||||||
ELM_MAPBUF_DATA_GET(obj, sd);
|
ELM_MAPBUF_DATA_GET(obj, sd);
|
||||||
if (sd->content)
|
if (sd->content)
|
||||||
{
|
{
|
||||||
efl_gfx_size_hint_combined_min_get(sd->content, &minw, &minh);
|
evas_object_size_hint_combined_min_get(sd->content, &minw, &minh);
|
||||||
evas_object_size_hint_max_get(sd->content, &maxw, &maxh);
|
evas_object_size_hint_max_get(sd->content, &maxw, &maxh);
|
||||||
}
|
}
|
||||||
evas_object_size_hint_min_set(obj, minw, minh);
|
evas_object_size_hint_min_set(obj, minw, minh);
|
||||||
|
|
|
@ -326,7 +326,7 @@ _elm_scroller_elm_layout_sizing_eval(Eo *obj, Elm_Scroller_Data *sd)
|
||||||
|
|
||||||
if (sd->content)
|
if (sd->content)
|
||||||
{
|
{
|
||||||
efl_gfx_size_hint_combined_min_get(sd->content, &minw, &minh);
|
evas_object_size_hint_combined_min_get(sd->content, &minw, &minh);
|
||||||
evas_object_size_hint_max_get(sd->content, &maxw, &maxh);
|
evas_object_size_hint_max_get(sd->content, &maxw, &maxh);
|
||||||
evas_object_size_hint_weight_get(sd->content, &xw, &yw);
|
evas_object_size_hint_weight_get(sd->content, &xw, &yw);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ _elm_segment_control_elm_layout_sizing_eval(Eo *obj, Elm_Segment_Control_Data *s
|
||||||
edje_object_size_min_restricted_calc
|
edje_object_size_min_restricted_calc
|
||||||
(wd->resize_obj, &minw, &minh, minw, minh);
|
(wd->resize_obj, &minw, &minh, minw, minh);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(obj, &w, &h);
|
evas_object_size_hint_combined_min_get(obj, &w, &h);
|
||||||
|
|
||||||
if (w > minw) minw = w;
|
if (w > minw) minw = w;
|
||||||
if (h > minh) minh = h;
|
if (h > minh) minh = h;
|
||||||
|
|
|
@ -138,7 +138,7 @@ _sizing_eval(Evas_Object *obj)
|
||||||
|
|
||||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
|
evas_object_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
|
||||||
evas_object_size_hint_min_set(obj, minw, minh);
|
evas_object_size_hint_min_set(obj, minw, minh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -430,7 +430,7 @@ _resize_job(void *data)
|
||||||
sd->resize_job = NULL;
|
sd->resize_job = NULL;
|
||||||
elm_interface_scrollable_content_viewport_geometry_get
|
elm_interface_scrollable_content_viewport_geometry_get
|
||||||
(obj, NULL, NULL, &vw, &vh);
|
(obj, NULL, NULL, &vw, &vh);
|
||||||
efl_gfx_size_hint_combined_min_get(sd->bx, &mw, &mh);
|
evas_object_size_hint_combined_min_get(sd->bx, &mw, &mh);
|
||||||
w = sd->minw_bx;
|
w = sd->minw_bx;
|
||||||
h = sd->minh_bx;
|
h = sd->minh_bx;
|
||||||
|
|
||||||
|
@ -1449,7 +1449,7 @@ _sizing_eval(Evas_Object *obj)
|
||||||
|
|
||||||
evas_object_resize(wd->resize_obj, w, h);
|
evas_object_resize(wd->resize_obj, w, h);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(sd->bx, &minw_bx, &minh_bx);
|
evas_object_size_hint_combined_min_get(sd->bx, &minw_bx, &minh_bx);
|
||||||
elm_interface_scrollable_content_viewport_geometry_get
|
elm_interface_scrollable_content_viewport_geometry_get
|
||||||
(obj, NULL, NULL, &vw, &vh);
|
(obj, NULL, NULL, &vw, &vh);
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ _smart_extents_non_homogeneous_calc(Evas_Object_Box_Data *priv, int w, int h, in
|
||||||
rrw = &oh, rrh = &ow;
|
rrw = &oh, rrh = &ow;
|
||||||
|
|
||||||
evas_object_size_hint_padding_get(opt->obj, &pad_l, &pad_r, &pad_t, &pad_b);
|
evas_object_size_hint_padding_get(opt->obj, &pad_l, &pad_r, &pad_t, &pad_b);
|
||||||
efl_gfx_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
|
evas_object_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
|
||||||
mnw += pad_l + pad_r;
|
mnw += pad_l + pad_r;
|
||||||
mnh += pad_t + pad_b;
|
mnh += pad_t + pad_b;
|
||||||
if (*rminw < *rw) *rminw = *rw;
|
if (*rminw < *rw) *rminw = *rw;
|
||||||
|
@ -254,7 +254,7 @@ _smart_extents_calculate(Evas_Object *box, Evas_Object_Box_Data *priv, int w, in
|
||||||
if (ay < 0) fh = 1;
|
if (ay < 0) fh = 1;
|
||||||
|
|
||||||
evas_object_size_hint_padding_get(opt->obj, &pad_l, &pad_r, &pad_t, &pad_b);
|
evas_object_size_hint_padding_get(opt->obj, &pad_l, &pad_r, &pad_t, &pad_b);
|
||||||
efl_gfx_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
|
evas_object_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
|
||||||
mnw += pad_l + pad_r;
|
mnw += pad_l + pad_r;
|
||||||
mnh += pad_t + pad_b;
|
mnh += pad_t + pad_b;
|
||||||
if (minh < mnh) minh = mnh;
|
if (minh < mnh) minh = mnh;
|
||||||
|
@ -375,7 +375,7 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal
|
||||||
_smart_extents_calculate(o, priv, w, h, expand, horizontal, homogeneous);
|
_smart_extents_calculate(o, priv, w, h, expand, horizontal, homogeneous);
|
||||||
evas_object_geometry_get(o, &x, &y, &w, &h);
|
evas_object_geometry_get(o, &x, &y, &w, &h);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(o, &minw, &minh);
|
evas_object_size_hint_combined_min_get(o, &minw, &minh);
|
||||||
evas_object_box_align_get(o, &ax, &ay);
|
evas_object_box_align_get(o, &ax, &ay);
|
||||||
/* if object size is less than min, apply align to trigger viewporting */
|
/* if object size is less than min, apply align to trigger viewporting */
|
||||||
if (w < minw)
|
if (w < minw)
|
||||||
|
@ -418,7 +418,7 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal
|
||||||
evas_object_size_hint_align_get(obj, &ax, &ay);
|
evas_object_size_hint_align_get(obj, &ax, &ay);
|
||||||
evas_object_size_hint_weight_get(obj, &wx, &wy);
|
evas_object_size_hint_weight_get(obj, &wx, &wy);
|
||||||
evas_object_size_hint_padding_get(obj, &pad_l, &pad_r, &pad_t, &pad_b);
|
evas_object_size_hint_padding_get(obj, &pad_l, &pad_r, &pad_t, &pad_b);
|
||||||
efl_gfx_size_hint_combined_min_get(obj, &mnw, &mnh);
|
evas_object_size_hint_combined_min_get(obj, &mnw, &mnh);
|
||||||
mnw += pad_l + pad_r;
|
mnw += pad_l + pad_r;
|
||||||
mnh += pad_t + pad_b;
|
mnh += pad_t + pad_b;
|
||||||
evas_object_size_hint_max_get(obj, &mxw, &mxh);
|
evas_object_size_hint_max_get(obj, &mxw, &mxh);
|
||||||
|
|
|
@ -512,7 +512,7 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt)
|
||||||
evas_object_layer_set(tt->tooltip, ELM_OBJECT_LAYER_TOOLTIP);
|
evas_object_layer_set(tt->tooltip, ELM_OBJECT_LAYER_TOOLTIP);
|
||||||
}
|
}
|
||||||
TTDBG("*******RECALC\n");
|
TTDBG("*******RECALC\n");
|
||||||
efl_gfx_size_hint_combined_min_get(tt->content, &ominw, &ominh);
|
evas_object_size_hint_combined_min_get(tt->content, &ominw, &ominh);
|
||||||
edje_object_size_min_get(tt->tooltip, &eminw, &eminh);
|
edje_object_size_min_get(tt->tooltip, &eminw, &eminh);
|
||||||
|
|
||||||
if (eminw && (ominw < eminw)) ominw = eminw;
|
if (eminw && (ominw < eminw)) ominw = eminw;
|
||||||
|
|
|
@ -48,6 +48,15 @@ EAPI Eina_Bool efl_canvas_output_unlock(Efl_Canvas_Output *output);
|
||||||
|
|
||||||
EAPI void efl_input_pointer_finalize(Efl_Input_Pointer *obj);
|
EAPI void efl_input_pointer_finalize(Efl_Input_Pointer *obj);
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
evas_object_size_hint_combined_min_get(const Eo *obj, int *w, int *h)
|
||||||
|
{
|
||||||
|
Eina_Size2D sz;
|
||||||
|
sz = efl_gfx_size_hint_combined_min_get(obj);
|
||||||
|
if (w) *w = sz.w;
|
||||||
|
if (h) *h = sz.h;
|
||||||
|
}
|
||||||
|
|
||||||
/* Internal EO APIs */
|
/* Internal EO APIs */
|
||||||
EOAPI void efl_canvas_object_legacy_ctor(Eo *obj);
|
EOAPI void efl_canvas_object_legacy_ctor(Eo *obj);
|
||||||
EOAPI void efl_canvas_object_type_set(Eo *obj, const char *type);
|
EOAPI void efl_canvas_object_type_set(Eo *obj, const char *type);
|
||||||
|
|
|
@ -608,7 +608,7 @@ _sizing_eval(Evas_Object *obj)
|
||||||
Evas_Coord minw, minh, maxw, maxh;
|
Evas_Coord minw, minh, maxw, maxh;
|
||||||
Evas_Coord w, h;
|
Evas_Coord w, h;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(obj, &minw, &minh);
|
evas_object_size_hint_combined_min_get(obj, &minw, &minh);
|
||||||
evas_object_size_hint_max_get(obj, &maxw, &maxh);
|
evas_object_size_hint_max_get(obj, &maxw, &maxh);
|
||||||
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
|
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
|
||||||
|
|
||||||
|
@ -638,7 +638,7 @@ _evas_object_box_layout_horizontal_weight_apply(Evas_Object_Box_Data *priv, Evas
|
||||||
{
|
{
|
||||||
int min_w;
|
int min_w;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(o, &min_w, NULL);
|
evas_object_size_hint_combined_min_get(o, &min_w, NULL);
|
||||||
evas_object_resize(o, min_w, h);
|
evas_object_resize(o, min_w, h);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -718,7 +718,7 @@ _evas_box_layout_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_D
|
||||||
(opt->obj, &padding_l, &padding_r, NULL, NULL);
|
(opt->obj, &padding_l, &padding_r, NULL, NULL);
|
||||||
req_w += padding_l + padding_r;
|
req_w += padding_l + padding_r;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(opt->obj, &minw, NULL);
|
evas_object_size_hint_combined_min_get(opt->obj, &minw, NULL);
|
||||||
if (minw > 0) totalminw += minw + padding_l + padding_r;
|
if (minw > 0) totalminw += minw + padding_l + padding_r;
|
||||||
if (EINA_DBL_EQ(weight_x, 0.0))
|
if (EINA_DBL_EQ(weight_x, 0.0))
|
||||||
{
|
{
|
||||||
|
@ -760,7 +760,7 @@ _evas_box_layout_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_D
|
||||||
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
|
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
|
||||||
evas_object_size_hint_max_get(opt->obj, NULL, &max_h);
|
evas_object_size_hint_max_get(opt->obj, NULL, &max_h);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(opt->obj, &minw, &minh);
|
evas_object_size_hint_combined_min_get(opt->obj, &minw, &minh);
|
||||||
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
|
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
|
||||||
|
|
||||||
off_x = padding_l;
|
off_x = padding_l;
|
||||||
|
@ -804,7 +804,7 @@ _evas_object_box_layout_vertical_weight_apply(Evas_Object_Box_Data *priv, Evas_O
|
||||||
{
|
{
|
||||||
int min_h;
|
int min_h;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(o, NULL, &min_h);
|
evas_object_size_hint_combined_min_get(o, NULL, &min_h);
|
||||||
evas_object_resize(o, w, min_h);
|
evas_object_resize(o, w, min_h);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -884,7 +884,7 @@ _evas_box_layout_vertical(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Dat
|
||||||
(opt->obj, NULL, NULL, &padding_t, &padding_b);
|
(opt->obj, NULL, NULL, &padding_t, &padding_b);
|
||||||
req_h += padding_t + padding_b;
|
req_h += padding_t + padding_b;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(opt->obj, NULL, &minh);
|
evas_object_size_hint_combined_min_get(opt->obj, NULL, &minh);
|
||||||
if (minh > 0) totalminh += minh + padding_t + padding_b;
|
if (minh > 0) totalminh += minh + padding_t + padding_b;
|
||||||
if (EINA_DBL_EQ(weight_y, 0.0))
|
if (EINA_DBL_EQ(weight_y, 0.0))
|
||||||
{
|
{
|
||||||
|
@ -926,7 +926,7 @@ _evas_box_layout_vertical(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Dat
|
||||||
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
|
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
|
||||||
evas_object_size_hint_max_get(opt->obj, &max_w, NULL);
|
evas_object_size_hint_max_get(opt->obj, &max_w, NULL);
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(opt->obj, &minw, &minh);
|
evas_object_size_hint_combined_min_get(opt->obj, &minw, &minh);
|
||||||
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
|
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
|
||||||
|
|
||||||
off_y = padding_t;
|
off_y = padding_t;
|
||||||
|
@ -986,7 +986,7 @@ _evas_box_layout_homogeneous_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_
|
||||||
evas_object_size_hint_padding_get
|
evas_object_size_hint_padding_get
|
||||||
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
|
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
|
||||||
evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
|
evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
|
||||||
efl_gfx_size_hint_combined_min_get(opt->obj, &min_w, NULL);
|
evas_object_size_hint_combined_min_get(opt->obj, &min_w, NULL);
|
||||||
|
|
||||||
_sizing_eval(opt->obj);
|
_sizing_eval(opt->obj);
|
||||||
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
|
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
|
||||||
|
@ -1050,7 +1050,7 @@ _evas_box_layout_homogeneous_vertical(Eo *o, Evas_Object_Box_Data *priv, Evas_Ob
|
||||||
evas_object_size_hint_padding_get
|
evas_object_size_hint_padding_get
|
||||||
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
|
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
|
||||||
evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
|
evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
|
||||||
efl_gfx_size_hint_combined_min_get(opt->obj, NULL, &min_h);
|
evas_object_size_hint_combined_min_get(opt->obj, NULL, &min_h);
|
||||||
|
|
||||||
_sizing_eval(opt->obj);
|
_sizing_eval(opt->obj);
|
||||||
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
|
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
|
||||||
|
@ -1136,7 +1136,7 @@ _evas_box_layout_homogeneous_max_size_horizontal(Eo *o, Evas_Object_Box_Data *pr
|
||||||
evas_object_size_hint_padding_get
|
evas_object_size_hint_padding_get
|
||||||
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
|
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
|
||||||
evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
|
evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
|
||||||
efl_gfx_size_hint_combined_min_get(opt->obj, &min_w, NULL);
|
evas_object_size_hint_combined_min_get(opt->obj, &min_w, NULL);
|
||||||
|
|
||||||
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
|
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
|
||||||
|
|
||||||
|
@ -1223,7 +1223,7 @@ _evas_box_layout_homogeneous_max_size_vertical(Eo *o, Evas_Object_Box_Data *priv
|
||||||
evas_object_size_hint_padding_get
|
evas_object_size_hint_padding_get
|
||||||
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
|
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
|
||||||
evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
|
evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
|
||||||
efl_gfx_size_hint_combined_min_get(opt->obj, NULL, &min_h);
|
evas_object_size_hint_combined_min_get(opt->obj, NULL, &min_h);
|
||||||
|
|
||||||
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
|
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
|
||||||
|
|
||||||
|
@ -1634,7 +1634,7 @@ _evas_box_layout_stack(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *
|
||||||
evas_object_size_hint_padding_get
|
evas_object_size_hint_padding_get
|
||||||
(child, &pad_l, &pad_r, &pad_t, &pad_b);
|
(child, &pad_l, &pad_r, &pad_t, &pad_b);
|
||||||
evas_object_size_hint_max_get(child, &max_w, &max_h);
|
evas_object_size_hint_max_get(child, &max_w, &max_h);
|
||||||
efl_gfx_size_hint_combined_min_get(child, &min_w, &min_h);
|
evas_object_size_hint_combined_min_get(child, &min_w, &min_h);
|
||||||
|
|
||||||
_sizing_eval(opt->obj);
|
_sizing_eval(opt->obj);
|
||||||
evas_object_geometry_get(child, NULL, NULL, &child_w, &child_h);
|
evas_object_geometry_get(child, NULL, NULL, &child_w, &child_h);
|
||||||
|
|
|
@ -1423,17 +1423,17 @@ _efl_canvas_object_efl_gfx_size_hint_hint_restricted_min_set(Eo *eo_obj, Evas_Ob
|
||||||
evas_object_inform_call_changed_size_hints(eo_obj);
|
evas_object_inform_call_changed_size_hints(eo_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static Eina_Size2D
|
||||||
_efl_canvas_object_efl_gfx_size_hint_hint_combined_min_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *w, Evas_Coord *h)
|
_efl_canvas_object_efl_gfx_size_hint_hint_combined_min_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
|
Eina_Size2D sz = { 0, 0 };
|
||||||
|
|
||||||
if ((!obj->size_hints) || obj->delete_me)
|
if ((!obj->size_hints) || obj->delete_me)
|
||||||
{
|
return sz;
|
||||||
if (w) *w = 0;
|
|
||||||
if (h) *h = 0;
|
sz.w = MAX(obj->size_hints->min.w, obj->size_hints->user_min.w);
|
||||||
return;
|
sz.h = MAX(obj->size_hints->min.h, obj->size_hints->user_min.h);
|
||||||
}
|
return sz;
|
||||||
if (w) *w = MAX(obj->size_hints->min.w, obj->size_hints->user_min.w);
|
|
||||||
if (h) *h = MAX(obj->size_hints->min.h, obj->size_hints->user_min.h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Size2D
|
EOLIAN static Eina_Size2D
|
||||||
|
|
|
@ -344,7 +344,7 @@ _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Table_Data *
|
||||||
Evas_Coord child_minw, child_minh, cell_minw, cell_minh;
|
Evas_Coord child_minw, child_minh, cell_minw, cell_minh;
|
||||||
double weightw, weighth;
|
double weightw, weighth;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(child, &opt->min.w, &opt->min.h);
|
evas_object_size_hint_combined_min_get(child, &opt->min.w, &opt->min.h);
|
||||||
evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h);
|
evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h);
|
||||||
evas_object_size_hint_padding_get
|
evas_object_size_hint_padding_get
|
||||||
(child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b);
|
(child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b);
|
||||||
|
@ -435,7 +435,7 @@ _evas_object_table_calculate_layout_homogeneous_sizes_item(const Evas_Object *o,
|
||||||
Evas_Coord minw, minh;
|
Evas_Coord minw, minh;
|
||||||
Eina_Bool expand_h, expand_v;
|
Eina_Bool expand_h, expand_v;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(o, &minw, &minh);
|
evas_object_size_hint_combined_min_get(o, &minw, &minh);
|
||||||
expand_h = priv->expand_h;
|
expand_h = priv->expand_h;
|
||||||
expand_v = priv->expand_v;
|
expand_v = priv->expand_v;
|
||||||
|
|
||||||
|
@ -659,7 +659,7 @@ _evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Table_Data *priv
|
||||||
Evas_Object *child = opt->obj;
|
Evas_Object *child = opt->obj;
|
||||||
double weightw, weighth;
|
double weightw, weighth;
|
||||||
|
|
||||||
efl_gfx_size_hint_combined_min_get(child, &opt->min.w, &opt->min.h);
|
evas_object_size_hint_combined_min_get(child, &opt->min.w, &opt->min.h);
|
||||||
evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h);
|
evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h);
|
||||||
evas_object_size_hint_padding_get
|
evas_object_size_hint_padding_get
|
||||||
(child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b);
|
(child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b);
|
||||||
|
|
Loading…
Reference in New Issue