forked from enlightenment/enlightenment
always use largest available size for free-oriented gadgets
ensure that gadgets don't unexpectedly clamp to minimum size
This commit is contained in:
parent
9439228816
commit
d1953c2205
|
@ -373,8 +373,8 @@ _site_gadget_resize(Evas_Object *g, int w, int h, Evas_Coord *ww, Evas_Coord *hh
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*ww = mnw, *hh = mnh;
|
*ww = mnw, *hh = mnh;
|
||||||
if (!(*ww)) *ww = w;
|
if ((!(*ww)) || ((*ww) < w)) *ww = w;
|
||||||
if (!(*hh)) *hh = h;
|
if ((!(*hh)) || ((*hh) < h)) *hh = h;
|
||||||
}
|
}
|
||||||
if (aspect && ax && ay)
|
if (aspect && ax && ay)
|
||||||
{
|
{
|
||||||
|
@ -395,7 +395,14 @@ _site_gadget_resize(Evas_Object *g, int w, int h, Evas_Coord *ww, Evas_Coord *hh
|
||||||
{
|
{
|
||||||
double ar = ax / (double) ay;
|
double ar = ax / (double) ay;
|
||||||
|
|
||||||
if (ar > 1.0)
|
if (ax == ay)
|
||||||
|
{
|
||||||
|
if (*ww > *hh)
|
||||||
|
*hh = *ww;
|
||||||
|
else
|
||||||
|
*ww = *hh;
|
||||||
|
}
|
||||||
|
else if (ar > 1.0)
|
||||||
*hh = (*ww * ay / ax);
|
*hh = (*ww * ay / ax);
|
||||||
else
|
else
|
||||||
*ww = (*hh * ax / ay);
|
*ww = (*hh * ax / ay);
|
||||||
|
|
Loading…
Reference in New Issue