this never worked... the code just was not there to look uop color
classes in text styles and change/replace them. this fixes that. it
implements them. it implements color_class to replace color=xxx but
also supports color=cc:colorclassname (so backing_color=cc:xxx works
too to specify a colorclass for a backing color, and underline and so
on). so now it's implemented and actually works... it can be used.
this SHOULD have alwasy worked... but hey. apoparently not.
@fix
Summary:
When there is "font" and "font_size" in textblock style (already defined),
If "font" and "font_size" are set using edje_text_class_set(),
then "font" and "font_size" are defined duplicated in texblock style through eina_strbuf_append.
Duplicate properties use memory unnecessarily,
and also it is possible to cause confusion at debbuging.
This patch replaces duplicate properties "font", "font_size" using eina_strbuf_replace.
Test Plan:
* textblock style in edc
"font=Sans font_size=20 wrap=mixed text_class=TEXT_CLASS";
* edje_text_class_set in c
edje_text_class_set("TEXT_CLASS", "font=DejavuSans", 40);
* textblock style at runtime (BEFORE)
DEFAULT='font=Sans font_size=20 wrap=mixed font_size=40.0 font=DejavuSans'
* textblock style at runtime (AFTER)
DEFAULT='font=DejavuSans font_size=40 wrap=mixed'
Reviewers: subodh6129, woohyun, ali.alzyod
Reviewed By: ali.alzyod
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11962
implement text_class override at object level, where you can change the text_class for single textblock object instead of override all objects that share same text class.
This imported from TIZEN
Note:
This also fix edje_textblock font/font_size parsing by adding condition
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10598
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
Summary:
All those api's are working on the Edje_file level so by appending the file prefix
and changing the argument to Edje_File leads to easy maintainability.
Depends on D9776
Reviewers: Hermet, ali.alzyod, zmike
Reviewed By: zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9777
Summary:
As user request for the evas_textblock_style through _edje_textblock_style_get()
api and that api implements lazy computation of the styles. By just marking the
style dirty (stl->cache=false) will be enough. no need to calculate the style
computaion at that time.
Reviewers: Hermet, ali.alzyod, kimcinoo, woohyun
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9776
Summary:
Now all textblock_style functionality are wrapped under api
for easy of optimization. so going forward no one should directly
acess the styles from the File . the styles should be acesses by
the internal api's provided by edje_textblock_style.
Reviewers: Hermet, ali.alzyod, woohyun, kimcinoo
Reviewed By: kimcinoo
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9774
Summary:
If the style is readonly then we know for sure it dosen't have any text_class/color_class.
If a style has text_class tag then call update only once not for each text_class tag it has.
Reviewers: ali.alzyod, Hermet, cedric, raster
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9641
Summary:
Instead of updating all the styles in an Edje_File just mark them
dirty so that subsequent call to style will recompute the new style before
returning the style.
Reviewers: ali.alzyod, Hermet, raster, cedric
Reviewed By: cedric
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9697
Summary:
We already have a escaped string for the font_source so
this code is unnecessary.
Reviewers: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9698
Summary:
If the style is not readonly we always compute the style again when
requested by edje. so this computation is unnecessary.
By avoiding the computation here we will avoid style computation of all the styles in the edje
that is not readonly hence saving memory.
Reviewers: ali.alzyod, Hermet, cedric, raster
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9693
As edje mostly deals with style string. to get the style data each time
it linearly search through list to find out the style which is not very
cache friendly so keep a hash to do first lookup with less impact on cache.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9547
Currently we do 2 pass updation. first we scan through all the styles
and check if they have text_style which matches the test_style we need to update
then we mark them dirty. then we call style_all_update() to go through the list
again and update those styles.
By combining them both in a single function we avoid scanning through the whole
list again.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9639
Summary:
we should only add font_size tag if the new size is different.
we should only add font tag if there is a new font.
Reviewers: ali.alzyod, Hermet, cedric, raster
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9613
Just to check if the edje style has text_class tag we do
lot of pointer hopping by linearly scan through the tags in the
style which is not very cache efficient.
by keeping a readonly flag we can avoid those acess if the style dosen't
have any text_class tags. and if we have those tags then we can start
updating the style straight away.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9546
Summary:
Both font and font_size are already added into the style text
in _edje_format_reparse() function and there we update the tag->font_size
as well as tag->font member. so I think it is unnecessary to
add again which has memory as well as parsing performance impact.
Note :
someone please update this cryptic comment
/* Add font name last to save evas from multiple loads */
how this is going to help saving multiple load.
Reviewers: ali.alzyod, Hermet, raster, cedric
Reviewed By: Hermet
Subscribers: segfaultxavi, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9543
Evas_TextBlock_Style has no idea about the text_class tag its a garbage value to it.
So keep the text_class tag in the edje level and update the text style property in the
final style string when necessary.
Because text_class id tends to be unique by removing from the final style string
enable it to be shared (string shared string).
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9544
Summary:
If font source is not embedded in edje, it should not
be appended in font source to skip the lookup in edj file
while loading font.
@fix
Test Plan: NA
Reviewers: cedric
Reviewed By: cedric
Subscribers: shilpasingh
Differential Revision: https://phab.enlightenment.org/D5909
Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
If there is no member styles when a text_class is updated,
newly added styles can't be updated.
So, newly added styles as member of text_class should be updated.
@fix
Test Plan:
Test case is included.
1. Run "elementary_test -to "font overlay""
2. Press Next button. Check the font size.
3. Press Prev button.
4. Put font_size as 50
5. Click Apply button.
6. Press Next button. Check the font size is not changed.
Reviewers: cedric, tasn, herdsman, raster
Subscribers: jpeg, z-wony, Blackmole
Differential Revision: https://phab.enlightenment.org/D4125
Most of the time the style string will come from the eet file directly, so
thanks to the dictionnary build in they should be pointing to the same string.
We still need to keep strcmp case for Edje_Edit case, but that shouldn't be
a real issue as the worst case is when it match. When it doesn't match strcmp
should return quite fast on average.
Summary:
When textblock styles have text_classes, all edjes in the files were added
to text_class_member_hash even if the edjes didn't use the textblock styles. It
makes time long to update text_class.
This will add the edje using the textblock style which has a text_class to
text_class_member_hash.
Reviewers: cedric, raster
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2035
this is still in progress, mostly the multisense stuff is pending.
it seems that when we merge ecore_audio in edje the libremix and
similar are gone, at least from Edje, and will be in ecore_audio
itself (or pulseaudio).
Changes:
* __UNUSED__ to EINA_UNUSED
* binaries (epp, embryo_cc, edje_cc) now consider EFL_RUN_IN_TREE and
will assume the binaries are still not installed, running from
build tree location (needs more testing, maybe doesn't work with
srcdir != builddir, still doesn't solve cross compile builds)
SVN revision: 82139