Commit Graph

13 Commits

Author SHA1 Message Date
Mike Blumenkrantz 823b7b05cd elm: resolve float comparison warnings
Summary: Depends on D11790

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11791
2020-05-09 09:25:21 +01:00
Carsten Haitzler cd4508150d elm icon/image efl ui image - respect aspect hints at all if set
these did not even look at aspect hints when calculating sizing. that
means any attempt to set them would lead to... nothing useful. this
handles horiz/vert/both cases (as best as is possible).

@fix

This reverts previous commit and fixes it in the box layout to respect
aspect in elm boxes. note - this probably needs doing in other
containers too like table...

Revert "elm icon/image efl ui image - respect aspect hints at all if set"
2020-04-06 19:34:25 +01:00
SangHyeon Jade Lee 3ce052d9ec elm : fix unintialized data set
Summary:
fw, fh can be referenced in _box_object_aspect_calc
without initialized when ax, ay is greater or equal than 0.

Reviewers: eagleeye

Reviewed By: eagleeye

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11348
2020-02-14 14:29:36 +09:00
Mike Blumenkrantz 790d4a9a1d elm/box_layout: rename variables
Summary:
the mnw and mnh variables were misleading in this context because they actually
refer to the max width and max height

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D6859
2018-08-17 11:30:36 -04:00
Jean-Philippe Andre a72f3ec64e 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.
2017-09-18 16:33:33 +09:00
Jean-Philippe Andre 85d04a74d4 elm_box: Fix support of aspect hints
Test scenario: ephoto without a recent patch (47fe2b9ab03c151b0f4).
Before any further explanation, ephoto was definitely misusing the
aspect API here. A label most definitely shouldn't be sized based on an
aspect ratio, that's just crazy (you really want to make it as tall as
it's wide?)

If a box has an aspected item, it needs to run its min calc loop twice:
 1. Once to determine the "true" min size in the direction of the box
    (ie.  in X in case of a horizontal box), and
 2. Once more in order to apply the aspect ratio to aspected items and
    augment the perpendicular min size (ie. Y for horizontal).

After that, it can go and layout the items based on the available size.

As we may guess from the above description (1) determines min W and
(2) determines min H (in horizontal mode).

BUT, there were two problems:
 - The wrong item min size was used inside the 2nd loop (the code was
   not symmetrical between horizontal and vertical modes). These are the
   changes in _smart_extents_non_homogeneous_calc.
 - The box min length was based on the actual size of aspected items,
   rather than their min size. This goes against the observation. These
   are the changes in _smart_extents_calculate.

Ref T5888

@fix
2017-08-21 18:35:31 +09:00
Carsten Haitzler 8b6e72bfad els box - remove rudundant double check
not a bug but checking something twice in a row isn't too useful

found by PVS studio
2017-07-29 10:56:53 +09:00
Mike Blumenkrantz 049d0c1f4c elm_box: use correct aspect ratio for HORIZONTAL layout
ratio should be flipped in this case

@fix
2017-07-28 15:40:47 -04:00
Mike Blumenkrantz 531422a2bb elm_box: use homogeneous layout if only one child exists
this should be a small speedup for a corner case of box use
2017-07-28 15:40:47 -04:00
Mike Blumenkrantz 0ea378802d elm_box: allow aspects 1 <= x < 0.0
this was a typo in my initial implementation

@fix
2017-01-13 11:33:59 -05:00
Jean-Philippe Andre 37625fca91 Evas/Edje/Elm: Use combined_min instead of min everywhere
This allows apps to set the objects min size with hint_min,
while letting the rest of EFL define the minimum size with
rstricted_min.

I don't like the property names much...
2016-06-09 16:37:49 +09:00
Jean-Philippe Andre cd8fb35951 els_box: Fix warning with clang
warning: comparison of constant 100 with expression of type
         'Evas_Aspect_Control' is always true
         [-Wtautological-constant-out-of-range-compare]
2016-04-06 16:28:33 +09:00
Cedric BAIL c2a1c49ab2 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00