Commit Graph

34 Commits

Author SHA1 Message Date
a.srour 0164162a48 Edje: edc text_class applied without font or font_size in style
Summary:
The issue with `text_class` in Edc styles has to be within a string containing `font` & `font_size` properties to effect style, if font or font_size not presented in the same string text_class will be ignored.

So in the following Edc example, `text_class` will be ignored:
```
collections {
   text_classes {
      text_class {
         name: "tc1";
         font: "Sans";
         size: 20;
      }
   }
   styles {
      style {
         name: "style1";
         base: "color=#00FF00 text_class=tc1";
         tag: "br" "\n";
      }
   }
}
```

To apply text_class `tc1`, font and font_size has to be added to `styles.style.base` value, to be as follows:
```
...
base: "font=Serif font_size=15 color=#00FF00 text_class=tc1";
...
```

NOTE: The produced font will be `Sans` and font_size equal to `20`

Test Plan:
`layout.edc`
```
// compile: edje_cc layout.edc
// play: edje_player layout.edj
collections {
    text_classes {
       text_class {
          name: "tc1";
          font: "Sans";
          size: 20;
       }
    }
    styles {
        style {
            name: "style1";
            base: "color=#FFFFFF text_class=tc1";
        }
    }
    group {
        name : "group1";
        parts {
           part {
              name : "tb1";
              type: TEXTBLOCK;
              scale: 1;
              entry_mode: NONE;
              description {
                  state: "default" 0.0;
                  rel1.relative: 0.0 0.0;
                  rel2.relative: 0.5 0.5;
                  text {
                     style: "style1";
                     align: 0.0 0.0;
                     text: "Hello EFL";
                  }
              }
           }
        }
    }
}

Reviewers: segfaultxavi, smohanty, ali.alzyod, cedric, zmike

Reviewed By: zmike

Subscribers: zmike, segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8477, T8478

Differential Revision: https://phab.enlightenment.org/D10692
2019-12-30 11:12:37 -05:00
Carsten Haitzler 346e5d1324 edje src - mark with efl version so we don't get warnings 2019-05-13 14:40:08 +01:00
Marcel Hollerbach 4edf8036e0 meson: correctly use the correct dependency
Summary:
edje_cc calls epp, so we should not only add edje_cc to the depends on
target, but rather also ensure that epp is availble. Additionally, this
removes unneccessary depends on declarations when we do cross compile.
Depends on D8561

Reviewers: zmike, segfaultxavi, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8562
2019-04-05 08:15:39 -04:00
Carsten Haitzler 6dedfddda7 meson - edje_cc use -fastcomp for fast builds in mesa 2019-01-24 14:04:07 +00:00
Marcel Hollerbach 5b98ebab4a meson: abstract edje_cc exec lines
the array is calling the shell etc. this makes cross building easier.

Differential Revision: https://phab.enlightenment.org/D7413
2018-12-06 15:13:34 +01:00
Daniel Hirt e8ed36af10 Canvas layout: fix test for meson builds
Fixes T7456
2018-11-08 11:44:05 +02:00
Daniel Hirt face90632e Canvas layout: support more Efl.Text.* with efl_part
This adds many Efl.Text.* that are useful for manipulating the
underlying TEXTBLOCK object's propeties using efl_part.

This has been implemented as part of the "user-defined" properties of
the layout part, so that the changes on the part persist across load of
different groups.

Note that text styles have precedence over the TEXTBLOCK (Canvas.Text)
object's properties. if an edc provides a style, the properties it
manipulates as part of the "base:" string would not be affected by this
API.

In general, this helps reducing the amount of styles for objects (or
modes of the same objects) that share the same setup, but are different
in some properties (e.g.  ellipsis, wrap etc).

@feature

Canvas layout: add text part "expand" property

This adds "expansion modes", which are essentially the same as min/max
hints in the edje part's 'description.text' fields.

The user can then customize his widget to different modes without being
forced to create a new edje group in the theme.

Note that there is an added check in case one of the min/max text flags
are provided from the theme. In such case, all flags from this new API
will be ignored.
This fortifies misuse where the flags are set both in theme and the API.

@feature
2018-11-06 18:33:56 +02:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Yeongjong Lee 9fc687a8c3 edje: call recalc in part_text_get if there is no available text data
Summary:
If edje_text_get is called before any edje_text_set function call, it return
null, because rp->typedata.text->text is only set by edje_text_set function.
If there is no available text data, find it from rp(edc).

ref 7bbf18a950

Test Plan: make check

Reviewers: zmike, id213sin, herdsman

Reviewed By: id213sin

Subscribers: Hermet, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6961
2018-09-28 16:14:00 +09:00
Youngbok Shin 69b5d67367 edje: fix text set/get issue without edje calculation
Summary:
Some changes broke really basical function behavior of text.
I couldn't get text from an edje object which I just set to the given edje object.
In the past code, edje called recalc function before trying to get text.
So, this patch bring that code to fix this issue.
@fix

Test Plan: Included. Run "make check"

Reviewers: herdsman, raster, cedric, woohyun, devilhorns

Subscribers: #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6364
2018-06-22 12:30:59 +03:00
Youngbok Shin cd0bd865eb edje: fix backward compatibility issue caused by legacy cursor funcs
Summary:
edje_object_part_text_cursor_prev/next/up/down has return value.
It has to return EINA_TRUE when only it successed.
But, when these funcs moved to legacy, it changed to return EINA_TRUE
whenever it fails or success. It must return EINA_FALSE when it fails.
@fix

Test Plan:
- Run test suite
  make check

Reviewers: herdsman, raster, cedric, woohyun

Subscribers: zmike

Differential Revision: https://phab.enlightenment.org/D5972
2018-05-02 19:48:46 +03:00
Sungtaek Hong d545929845 edje_signal: reduce member count when deleted edje_signal_callback is found
Summary:
 - when deleted callback is found _edje_signal_callback_move_last() is called
   in order to pack match array.
 - during _edje_signal_callback_move_last() index skips when another deleted
   callback is found, but does not reduce members_count.
 - this duplicates a remaining callback and calls the callback twice.

Test Plan:
1. add multiple edje_signal_callback by edje_object_signal_callback_add()
              which have the same source, signal, func but different data.
           2. delete first and last callback by
              edje_object_signal_callback_del/edje_object_signal_callback_del_full.
           3. emit edje_signal.
           4. observe one callback is called twice.

Reviewers: SanghyeonLee, conr2d, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4985
2017-07-17 15:05:20 +09:00
Jean-Philippe Andre bca55bb52f edje: Add test case for signal_recursive_process 2017-05-30 14:39:24 +09:00
Jean-Philippe Andre 9d48350ae4 edje: Implement EO API for message_send
Since this uses generic_value (aka Eina_Value), there is an
implicit type detection and conversion. I did not attempt to
cover all types (namely string+int and string+float and even
less sets of those) as I believe they aren't really used. Or
they most likely could be replaced by multiple messages rather
than a single message.

Note: should we pass ptr(generic_value) instead of generic_value?
The API looks a little odd in C when passing by value.

@feature
2017-05-24 13:02:20 +09:00
Jee-Yong Um ed7febb2c5 edje_cc: allow combine lazEDC keywords
Summary:
Fix parsing error which occurs when lazEDC keyword is combined
with other keyword by period. (like parts.rect)

@fix

Test Plan: Download attached file and run "make"

Reviewers: Hermet, cedric, jpeg

Subscribers: taxi2se

Differential Revision: https://phab.enlightenment.org/D4309
2016-09-23 11:56:19 +09:00
Jean-Philippe Andre 35fc3f5130 Edje: Test proxy objects more
This tests that a cached object is not reused invalidly if
it was ref'ed.
2016-05-24 18:50:58 +09:00
Jean-Philippe Andre f19da66843 Edje: Add test case for edje table
This tests the EO and Legacy APIs
2016-04-26 14:09:36 +09:00
Jean-Philippe Andre 12146ddea6 Edje: Return text defined in EDC in part_text_get
This function was returning only the text defined by part_text_set.
This is a behaviour change, as part_text_get() no longer returns NULL
if there is a string defined in EDC. But this now means that the actual
value displayed on screen can be retrieved by a simple API call.

@feature
2016-04-26 11:36:23 +09:00
Jean-Philippe Andre 24177057d0 Edje tests: Add test case for access_part_list
This tests eo and legacy apis
2016-04-26 11:36:23 +09:00
Jee-Yong Um 11cdd13945 edje: add test for edje_object_part_box_insert_after()
Summary:
This test checks the validity of edje_object_part_box_insert_after().
It depends on D3733.

Reviewers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D3833

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-04-18 16:21:07 -07:00
Tom Hacohen 70537370a1 Edje tests: Add parent upadting tests to edje. 2016-04-18 10:10:23 +01:00
Jee-Yong Um a416f73790 edje: add test for omitting "name" keyword in color_classes.color_class block
Summary:
This test checks whether omitting "name" keyword in color_classes.color_class
block in EDC work normally.

Depends on D3598

Test Plan: make check

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3615

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-02-05 07:51:34 +01:00
Jee-Yong Um 395ed14f63 edje: add size_class test case
Summary: add edje size_class APIs' test case

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3391
2015-12-16 14:56:39 +09:00
Jee-Yong Um 20671d84cd edje: add mising closing brace and adjust indents and spacing in test edc
Summary: A closing brace is missing, and indent is not aligned.

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3387

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 14:54:18 -08:00
Jean-Philippe Andre 73f9ca6297 Edje tests: Test inheritance of flag no_render 2015-10-02 12:25:29 +09:00
Jean-Philippe Andre 35fe059ec8 Edje: Add test case for SNAPSHOT
This is mostly an edje_cc compilation test.
2015-10-01 20:10:54 +09:00
Jean-Philippe Andre 6b7e4087d2 Edje tests: Add PROXY part to the filters test case
Only compilation is tested here.
Use edje_player to check the resulting edj if you wanna see what
happens.
2015-10-01 20:10:54 +09:00
Jean-Philippe Andre 6ca02cbfe8 Edje: Embed verbatim scripts for Efl.Gfx.Filters
This is now like the other embedded scripts, where a verbatim
string is parsed. The syntax is now:

filters {
   filter {
      name: "filter0";
      file: "filter.lua";
   }
   filter {
      name: "filter1";
      script {
         blend {}
      }
   }
   filter.file: "file.lua"; // name is "file.lua"
}

Thanks @raster for the quick review.
2015-07-01 20:46:34 +09:00
Jean-Philippe Andre d4de36a43a Edje: Fix test case (after syntax change)
Filters now belong to one of the filters sections:
- filters
- collections.filters
- collections.group.filters
2015-06-30 10:12:13 +09:00
Jean-Philippe Andre 6ca1ce305b Edje tests: Add test case for embedded text filters 2015-06-25 14:36:09 +09:00
Jean-Philippe Andre f24b45a7d0 Edje: Add test case for "no_render" and "clip_to" state flag 2015-06-15 16:59:41 +09:00
Nak-Gyeong Kim 7d33ae501b edje: edje_cc_parse should check pair of parens.
Summary:
Fix parens bug.
((x + y)-z) is OK.
((x + y) - z) is NOT OK. This patch can cover this case.

@fix

Signed-off-by: Nak-Gyeong Kim <nakkyong.kim@samsung.com>

Test Plan:
Test in edc.

((x + y)-z) is OK.
((x + y) - z) is NOT OK. This patch can cover this case.
If parens are not paired, it will notify.

Reviewers: raster, Hermet, cedric

Subscribers: kimcinoo, jaehwan

Differential Revision: https://phab.enlightenment.org/D2554

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-29 18:22:09 +02:00
Daniel Willmann 7927c0f9fa edje_test: Test geometry of a more complex layout
It seems someone thought it was fun to have rel2.offset behave
differently than rel1.offset...
A rel2.offset of 0 actually means the size is increased by one pixel.

Acocunt for that in the tests.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-06-28 14:25:30 +01:00
Nikolay Lopatka 3e07236148 Edje: Add test for edje_object_file_set.
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-03-13 16:47:53 +09:00