efl/src
Youngbok Shin 6e02557535 evas_textblock: remove style padding from native width and formatted height
Summary:
The style padding was included in native width(not in native height)
and formatted height(not in formatted width).
This is so weired. In addition, there is no enough document about
the relation between formatted size, native size and the style padding.
This issue is caused by a confusing code which is about how to handle
the style padding on item's width and height.("x_adjustment"!)

When Evas calculates "c->wmax" in line finalization stage, it explicitly subtract
style padding from line width. So, I assumed the formatted size has not to include
style padding. It is same for the native size.

The style padding will not be included in formatted size and native size by this commit.
@fix

Test Plan:
A test case is included in this commit.

Evas_Object *tb = evas_object_textblock_add(evas);

newst = evas_textblock_style_new();
evas_textblock_style_set(newst, "DEFAULT='font=Sans font_size=50 color=#000 text_class=entry'");
evas_object_textblock_style_set(tb, newst);

evas_object_textblock_text_markup_set(tb, "<style=far_soft_shadow>Test</>");
evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b);
fail_if((l != 0) || (r != 4) || (t != 0) || (b != 4));

/* Size with style padding */
evas_object_textblock_size_formatted_get(tb, &w, &h);
evas_object_textblock_size_native_get(tb, &nw, &nh);

/* It is non-sense if the following condition is true. */
fail_if((w + l + r == nw) && (h == nh + t + b));

Reviewers: raster, ali.alzyod, woohyun, bowonryu

Reviewed By: ali.alzyod

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12110
2020-09-01 19:39:13 +09:00
..
benchmarks benchmark: eina: remove outdated ecore_hash 2020-07-06 17:14:36 +02:00
bin eeze_mount binary: more secure check extension ('.iso' and not 'iso') 2020-09-01 09:35:49 +02:00
bindings Fix typos - (Part #3) 2020-07-06 10:52:51 +02:00
edje_external emotion: remove all left overs from removed backends 2020-06-05 12:47:43 +02:00
examples tests - evas vg - use proper enuams for evas vg api - warn fix 2020-08-25 13:21:25 +01:00
generic Get rid of trailing whitespaces (3 / 14) 2020-06-23 10:28:13 +02:00
lib evas_textblock: remove style padding from native width and formatted height 2020-09-01 19:39:13 +09:00
modules evas - sw generic - fix enum cast warn - valid checked 2020-08-25 13:21:25 +01:00
scripts build: disable elua by default, plus nicer detection 2020-06-06 19:28:26 +02:00
static_libs evas_textblock: rainbow flag emoji treated as two clusters(update unibreak to version 4.2) 2020-09-01 19:33:52 +09:00
tests evas_textblock: remove style padding from native width and formatted height 2020-09-01 19:39:13 +09:00
wayland_protocol refactor build 2020-05-27 11:06:46 +02:00