Commit Graph

160 Commits

Author SHA1 Message Date
Yeongjong Lee a227b83f41 efl_ui_layout: remove group_calcualte to respect legacy min size
Summary:
For legacy elm_layout, the size should be calculated based on
`hint_size_combined_min` instead of `hint_size_min` in the group_calculate.

Also, `_efl_ui_layout_efl_canvas_group_group_calculate` is unnecessary because
it is added to allow finger size policy differentiation between inherited layout
and layout object (see also, 46cf288d32), however,
it can be set by `finger_size_multiplier` proeprty in constructor.

Test Plan:
Check `evas_object_size_hint_min_set` is respected.

layout_example.c
```
//Compile with:
//edje_cc layout_example.edc &&  gcc -g layout_example.c -o layout_example `pkg-config --cflags --libs elementary`
#include <Elementary.h>

EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
   Evas_Object *win, *layout, *box;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("layout", "Layout");
   elm_win_autodel_set(win, EINA_TRUE);

   box = elm_box_add(win);
   evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(box);
   elm_win_resize_object_add(win, box);

   layout = elm_layout_add(box);
   evas_object_size_hint_min_set(layout, 300, 200);
   elm_layout_file_set(layout, "./layout_example.edj", "mylayout");
   evas_object_show(layout);
   elm_box_pack_end(box, layout);

   evas_object_resize(win, 300, 300);
   evas_object_show(win);

   elm_run();

   return 0;
}
ELM_MAIN()
```

layout_example.edc
```
collections {
   group {
      name: "mylayout";
      parts {
         part {
            name: "bg";
            type: RECT;
            description {
               state: "default" 0.0;
               color: 100 190 100 255;
            }
         }
         part {
            name: "mytext1";
            type: TEXT;
            description {
               state: "default" 0.0;
               text {
                  size: 30;
                  text: "my text1";
                  min: 1 0;
               }
               color: 0 255 0 255;
               rel1.relative: 0.0 0.0;
               rel2.relative: 1.0 0.3;
            }
         }
      }
      parts {
         part {
            name: "mytext2";
            type: TEXT;
            description {
               state: "default" 0.0;
               text {
                  size: 30;
                  text: "my text2";
                  min: 1 0;
               }
               color: 0 255 255 255;
               rel1.relative: 0.0 0.3;
               rel2.relative: 1.0 0.6;
            }
         }
      }
   }
}
```

Reviewers: zmike, Jaehyun_Cho, woohyun

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11858
2020-05-20 16:36:15 +09:00
Mike Blumenkrantz cf94110b04 elm: refactor legacy _icon_signal_emit
Summary:
this was duplicated for a number of widgets in slightly different ways,
so it can be unified as a private layout function to reduce maintenance
costs

Reviewers: Hermet, YOhoho, Jaehyun_Cho, jsuya

Reviewed By: jsuya

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11818
2020-05-13 10:02:36 -04:00
Mike Blumenkrantz 39b7069a0b efl_ui/layout: correctly batch object changed state when using freeze/thaw
previously this would always queue a recalc when calling thaw even if the
object hadn't changed

also mimic edje internal behavior with unsetting 'frozen' during force calc
for possible future handling even though it has no effect presently

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11628
2020-04-03 17:13:41 +02:00
Mike Blumenkrantz 190cf14959 efl_ui/layout: skip versioning checks for legacy widgets
Summary:
legacy widgets are always stable

fix T8630

Reviewers: eagleeye

Reviewed By: eagleeye

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8630

Differential Revision: https://phab.enlightenment.org/D11481
2020-03-11 09:37:42 -04:00
Marcel Hollerbach 090c351d38 elementary: use array instead of list for subchildren
this safes in the runtime of elm_test round about 9kb (*).
Additionally, using a array here is jumping way fewer times arround in
memory, as we do not need to jump from node to node in a list.

Additionally, this commit replaces a few abort disabler macros with a
error checking macro. (which cleans the log).

*: explanation: we have round about 600 widgets in elm_test, every
widget is normally refered once, every list node has 4 pointer, makes
round about 9600 bytes or rougly 9 KB. So the messured savings are more
or less explaining the reality.

Reviewed-by: Carsten Haitzler (Rasterman) <rasterman.com>
Differential Revision: https://phab.enlightenment.org/D11374
2020-02-19 16:28:11 +01:00
Hosang Kim 0e2778f0ca efl_ui_layout: send theme signal when style is already updated.
Summary:
If you run below code, text is invisible.

```
efl_add(EFL_UI_BUTTON_CLASS, box,
        efl_ui_widget_style_set(efl_added, "anchor"),
        efl_text_set(efl_added, "anchor style"),
        efl_pack_end(box, efl_added));
```

But below code is working well.
```
efl_add(EFL_UI_BUTTON_CLASS, box,
        efl_text_set(efl_added, "anchor style"),
        efl_ui_widget_style_set(efl_added, "anchor"),
        efl_pack_end(box, efl_added));
```

Test Plan: run  efl_ui_theme_example_01

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11118
2020-01-23 09:34:37 -05:00
Marcel Hollerbach 193ae1c14c efl_ui_layout: add API to check out the theme_version
this new API returns the theme version specified in the loaded theme.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10944
2019-12-20 10:33:37 -08:00
Marcel Hollerbach 1c0f72e4d3 efl_ui_layout: check theme version better
when we are having the version 1.23.99 we are preparing the release that
is going to be released with version 1.24. With this commit we can
declare theme versions to be for 1.24 which the version number is 1.23.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10891
2019-12-19 16:45:16 -08:00
Mike Blumenkrantz 22b005ea8a efl_ui/layout: unconditionally emit theme,changed event for legacy layouts
this will automatically be optimized by smart callback internals and fix
emission of this event

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10750
2019-12-04 16:48:01 +01:00
Mike Blumenkrantz 3f7a63149a efl_ui/layout: fix multiple emissions of theme,changed during construction
in the case where a layout object was created and had a theme manually set
with efl_ui_layout_theme_set() during construction, the layout would then
call theme_apply() a second time internally during finalize which, if the
theme has not changed (as can only be the case if this flag is unset),
results in a repeated theme_apply for the existing theme

@fix

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10738
2019-12-04 16:47:40 +01:00
Mike Blumenkrantz e9281cf124 efl_ui/layout: fix typo in theme,changed event checking and fix this event
this was a copy/paste error

ref 7ad8acc290

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10737
2019-12-04 16:47:37 +01:00
Mike Blumenkrantz 95b5731461 elm/layout: add some workarounds to try handling legacy min sizes
Summary:
if a legacy widget calls evas_object_size_hint_min_set, this actually sets
efl_gfx_hint_size_restricted_min now, which is supposed to be the hint that
is used internally by widgets. as a result, there is a conflict between the
size which the user expects and the size which the widget tries to calculate.

the user size should always be respected, however, so this adds some tracking
to determine whether the layout's min size was set by the layout during its own
calc or by something externally

@fix

Reviewers: eagleeye, CHAN, woohyun, Jaehyun_Cho, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10373
2019-10-14 09:30:23 -04:00
Mike Blumenkrantz 7ad8acc290 efl_ui/layout: selectively inhibit theme,changed event
Summary:
this is called a ton.

ref T8321
Depends on D10359

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10360
2019-10-14 09:30:10 -04:00
Mike Blumenkrantz 5256b9476d efl_ui/layout: improve error message when theme version parsing fails
Summary:
be very explicit here so that users can immediately know how to resolve
the issue
Depends on D10193

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10194
2019-09-26 18:00:32 +02:00
Mike Blumenkrantz 6f6407729e efl_ui/layout: fix shadow warning
Summary:
a variable with the same name is declared above
Depends on D10192

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10193
2019-09-26 18:00:31 +02:00
Mike Blumenkrantz a21dacbad6 efl_ui/layout: use better check for determining whether to defer signals
Summary:
a layout (not layout_base) should not defer signals. theme groups loaded
by a layout widget can be anything, and are not subject to the versioning
requirements that efl widgets have
Depends on D10055

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10192
2019-09-26 18:00:31 +02:00
Mike Blumenkrantz 9b18e5a291 theme: efl,state,(content|text),(set|unset) -> efl,(content|text),(set|unset)
Summary:
this is versioned, so the correct signal will always be emitted for the theme
version that is provided

ref T8231

Depends on D10164

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8231

Differential Revision: https://phab.enlightenment.org/D10158
2019-09-25 17:55:35 -04:00
Mike Blumenkrantz f24ce654c0 efl_ui/layout: add mechanism for deferring versioned theme signals
Summary:
the theme version isn't available until the theme has been applied, so
we can create an array of all the pending signals and defer them until
such time as we get a theme or destroy the object

this is internal and can be reworked at a later time as needed

ref T8231

Depends on D10157

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8231

Differential Revision: https://phab.enlightenment.org/D10164
2019-09-25 17:55:29 -04:00
Lauro Moura 1115752451 elm: Avoid maybe unitialized variable accesses
Reviewers: cedric, bu5hm4n, zmike, felipealmeida

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10170
2019-09-25 16:15:43 -04:00
Cedric Bail 267f8fcfa8 elementary: return an error when unimplemented function on Efl.Ui.Widget_Factory.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10130
2019-09-25 11:31:02 -07:00
Mike Blumenkrantz 9206960dfa efl_ui/layout: add explicit error case when theme version > efl version
it's important to handle cases where a "future" theme is trying to be used
by "current" efl. this throws a serious error, since it's possible that the
widget may look/act in a way that makes it unusable

ref T8231

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10153
2019-09-25 11:30:57 -07:00
Yeongjong Lee 09b2ecec6d efl_ui_layout: fix null pointer dereferences
Summary: If theme doesn't have version data, `version` can be NULL.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10146
2019-09-25 06:44:56 -04:00
Mike Blumenkrantz 1511430c29 efl_ui/layout: validate theme api version in theme_apply
Summary:
this throws error and warning messages if the theme api version does
not match the current efl version, and it will cause unit tests to fail
when the theme version is not updated

ref T8231

Depends on D10093

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8231

Differential Revision: https://phab.enlightenment.org/D10081
2019-09-24 17:12:01 -04:00
Mike Blumenkrantz 91f18dc427 efl_ui/layout: fix part aliasing for non-legacy widgets
if a non-null value is passed here, this needs to actually evaluate
all the part aliases

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10091
2019-09-24 13:56:12 -07:00
Mike Blumenkrantz 105f016fc9 elm: rename layout part aliasing functions/macros
these are internal apis for managing part aliasing on the C side,
but they apply to efl_ui_layout and not elm_layout

no functional changes

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D10090
2019-09-24 13:56:11 -07:00
Cedric Bail 5493cc5396 efl: make Efl.Ui.Factory.release work in batches.
This will enable better strategy in scheduling removal of object from the cache
instead of doing the throttling in the View as there is a better understanding
of the different layer the items are going to go through and where they will
consume time.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9955
2019-09-24 09:18:52 +02:00
Cedric Bail 892c26f906 efl: simplify logic for widget created by factory.
In an attempt to make things more complex than they should have been,
I tried to change the inheritance tree on the fly and assume widget would
rely on autodeleting its children. This is way more complex of a solution
than to let the View actually release all the child manually and just set
the window as the default parent.h

Co-authored-by: Marcel Hollerbach <mail@marcel-hollerbach.de>

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9953
2019-09-24 09:18:49 +02:00
Mike Blumenkrantz 74cfe457c3 efl_ui/layout: move 'frozen' struct member to be a bool bitflag
this is already handled by edje, all we really want here is a flag
to avoid more eo lookups internally when calling canvas_group_change

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10079
2019-09-23 10:33:11 -07:00
Mike Blumenkrantz 654e783d28 elm/layout: remove check for finalize in efl_canvas_group_change impl
this used to be a thing in order to prevent widgets from spamming themselves
with recalcs during construction, but since that's no longer possible we
can remove this and also resolve an issue where legacy widgets failed
to correctly calculate their min size if no text was set

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10043
2019-09-23 10:44:32 +02:00
Marcel Hollerbach b4976fdf2c efl_ui_*: fix dereferencing of possible NULL values
this fixes CID 1404763 & 1404751 & 1403904
2019-09-16 17:28:31 +02:00
Mike Blumenkrantz 9e0a285eea efl: implement efl.file::unload for classes that implement load
unload is a crucial method for classes that implement load, as this is
the method which is called during e.g., efl_file_simple_load() when
a new file is specified in order to destroy the previous object data

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9786
2019-08-29 17:17:08 +02:00
Marcel Hollerbach c6e338bb9a efl_ui_layout: remove efl.end
someone decided it should be named efl.extra, the previous commits are
ensuring that.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9773
2019-08-29 08:29:57 +02:00
SangHyeon Jade Lee 14f9782a81 efl_ui : add efl.extra part as layout swallow part list.
Summary:
efl.extra part is extra part of the layout swallow,
which can be generally used on overall layout object.
To be supported layout part infrastructures,
add efl.extra on layout_swallow_part[] list.

Depends on D9233

Reviewers: cedric, bu5hm4n, zmike, segfaultxavi

Reviewed By: bu5hm4n

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9316
2019-08-29 10:21:39 +09:00
Cedric BAIL 0248d504b3 elementary: switch Efl.Ui.Factory API to a batch API and update all class using it.
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>>
Differential Revision: https://phab.enlightenment.org/D9579
2019-08-21 11:18:34 -07:00
Marcel Hollerbach 3c098673ab efl_ui_widget: remove x,y,w,h
this is used for storing the position and size of the widget. However,
just in elm_test this eats 2KB of ram, just for saving them. The cases
where they have been used do not seem like a great performance hotspot,
additionally, in the panel cases the privat data of the widget is
achived anyways, so eo is involved and we are spending some time there
anyways.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9646
2019-08-20 12:30:07 -07:00
Mike Blumenkrantz 07e810c5cc efl_ui/layout: implement unimplemented methods
Summary:
add redirects to internal layout objects for these methods
Depends on D9561

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9562
2019-08-14 19:25:53 +02:00
Yeongjong Lee c857955a4e efl_ui_layout: remove efl_gfx_hint_size_min_set in _sizing_eval
Summary:
`evas_object_size_hint_min_set` is replaced with `efl_gfx_hint_size_min_set` in
4d79efce6. it is able to have backward compatibility issue because
`evas_object_size_hint_min_set` call `efl_gfx_hint_size_restricted_min_set`
internally.
```
evas_object_main.c:2501
EAPI void
evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
{
   efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(w, h));
}
```

This patch remove unnecessary min_set call.

Test Plan: elementary_test

Reviewers: zmike, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9566
2019-08-14 17:48:32 +09:00
Jaehyun Cho b8d1747382 efl_ui_layout: fix typo in _sizing_eval 2019-08-14 10:29:49 +09:00
Mike Blumenkrantz c594c83a02 efl_ui/layout: use MAX macro for min size clamping in group calc
Summary: Depends on D9442

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D9447
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 872d43f0a0 elm_layout: move elm_layout_sizing_restricted_eval to layout mixin
Summary:
this function should never need to be called on new widgets

Depends on D9440

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9441
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 4d79efce64 elm_layout: create a mixin to provide elm_layout_sizing_eval
Summary:
this removes elm_layout_sizing_eval entirely from the implementation
hierarchy of any efl_ui-based widgets, ensuring that future code will
correctly use efl_canvas_group functionality

Depends on D9439

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9440
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 7e517e2a11 elm/efl_ui: remove elm_layout_sizing_eval implementations
Summary:
historically there have been two methods of calculating sizes in elm:
* elm_layout_sizing_eval
* evas_object_smart_calculate (now efl_canvas_group_calculate)

the former was used to set size hints on widgets, while the latter was
used to perform internal size calcs for the widget. for things to
work correctly, these functions had to be triggered in just the right
order at just the right time. many hard-to-fix bugs related to widget
sizing over the years have been the result of this split

this patch removes elm_layout_sizing_eval implementations so that all
widgets perform both internal size calcs and size hint setting all
in the same function, ensuring that these are always in sync

the result is that in the vast majority of cases, far fewer recalcs
happen for widgets, and they are quicker to achieve their final size

Depends on D9438

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9439
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 586f41f927 efl_ui/layout_base: add subobjs_calc internal functionality
Summary:
this functionality forces group_calc on a layout's subobjects during
layout group_calc so that the layout's own group_calc will yield consistent
and correct results

currently this is only used in panel widgets

Depends on D9437

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9438
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz e583eba56b efl_ui/layout_base: add "finger_size_multiplier" property
Summary:
this feature is set on objects which inherit from layout_base in order to
allow automatically application of variable finger sizes based on a
widget's needs

an example of this would be a calendar, which is 7:8 fingers

this functionality is disabled by passing 0,0 as the property

@feature

Depends on D9436

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9437
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 46cf288d32 efl_ui/layout: implement group_calc, add finger size for inherited layouts
Summary:
this adds a group_calc implementation for the layout object (not layout_base)
to allow differentiation between inherited layout calcs and layout object
calcs

by using this, we can automatically apply finger size to inherited layout
calcs if the implementation ever reaches this point

Depends on D9435

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9436
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 268d06d381 efl_ui/layout: use min size hints when calculating layout size
Summary:
for legacy layouts, all min size hints should be considered when performing
size calculations

for non-legacy layouts, only "user" min size hints should be considered, as we
are calculating the restricted min size hint in this function

Depends on D9434

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9435
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz adc510f9ee efl_ui: change calls to elm_layout_sizing_eval to efl_canvas_group_change
Summary:
elm_layout_sizing_eval is a legacy function which should not need to be called
on new widgets

Reviewers: segfaultxavi, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9434
2019-07-30 13:12:52 -04:00
Carsten Haitzler a26c787e2b Revert "efl_ui_layout: set needs_size_calc flag at constructor"
This reverts commit 98b1924432.

This totally broke elm widget min size calcs, e dialogs... sizing is
totally broken and unusable as a result. this is a major break and
needs immediate reverting back to a working state. Sorry Woki. You
need to test this... elementary_Test out of the box is totally broken
as all hell not to mention a lot more.
2019-07-22 15:10:40 +01:00
Wonki Kim 98b1924432 efl_ui_layout: set needs_size_calc flag at constructor
Summary:
even if there is a min definition on theme for some object,
the objects don't have the min size if we do nothing after creating it.

elm_layout_sizing_eval will return with doing nothing while executing contructor
so that _sizing_eval in _layout_group_calculate will never be invoked without calling hint_set, text_set, content_set, etc.

this patch modifies a initial state of needs_size_calc flag
so that object will doing _sizing_eval after executing constructor.

Test Plan:
1. remove lines that call apis such as content_set, hint_set, text_set
  in radio test on elementary_test

2. observe that radios don't have min size

Reviewers: bu5hm4n, Hermet, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9368
2019-07-22 09:08:55 -04:00
Cedric BAIL c0e7b1343c elementary: Efl.Ui.Layout now rely on model change event to track the model.
This means that this will work nicely with model provider too.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9291
2019-07-17 21:57:52 +02:00