efl/src/lib
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
..
ecore Ecore: more precise implementation of ecore_time_get on Windows 2020-08-31 14:24:05 +02:00
ecore_audio Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_avahi lib: add more c_args handling for places we missed before 2020-05-26 10:15:27 +02:00
ecore_buffer refactor build 2020-05-27 11:06:46 +02:00
ecore_cocoa Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_con ecore con - curl - fix error map to map right enum 2020-08-25 13:21:25 +01:00
ecore_drm Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_drm2 refactor build 2020-05-27 11:06:46 +02:00
ecore_evas ecore evas - use correct enums for legacy funcstions to remove warns 2020-08-25 13:21:25 +01:00
ecore_fb Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_file ecore_file_can_exec: fix .bat case 2020-09-01 09:35:46 +02:00
ecore_imf Fix typos - (Part #2) 2020-07-06 10:52:49 +02:00
ecore_imf_evas refactor build 2020-05-27 11:06:46 +02:00
ecore_input ecore input - make an unsupported joystick a warn not an err... 2020-08-11 13:49:30 +01:00
ecore_input_evas Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_ipc ecore_ipc: remove duplicated condition 2020-07-31 10:14:00 +02:00
ecore_sdl Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_wayland Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_win32 refactor build 2020-05-27 11:06:46 +02:00
ecore_wl2 ecore_wl2_display: move wl_display_dispatch_pending before condition check. 2020-08-22 08:25:06 -04:00
ecore_x ecore x - go back to vsync thread. this will be more reliable 2020-08-20 08:52:32 +01:00
ector Get rid of trailing whitespaces (5 / 14) 2020-06-23 10:29:25 +02:00
edje edje - fix enum cast warnings - checked values 2020-08-25 13:21:25 +01:00
eet eet: Fix 'No OPENSSL_Applink' error message. 2020-08-19 15:59:52 +02:00
eeze Get rid of trailing whitespaces (7 / 14) 2020-06-23 10:30:05 +02:00
efl Fix typos 2020-06-25 09:03:05 +02:00
efl_canvas_wl efl_canvas: fix a potentional error of null deref 2020-08-05 10:47:15 +02:00
efl_mono efl_mono: Create insert list/array c# wrapper for eina_value. 2020-02-13 15:26:50 -03:00
efreet Fix typos - (Part #5) 2020-06-25 09:03:07 +02:00
eina eina - statgen (stat generation) - fix enable api to actually enable 2020-08-30 12:04:13 +01:00
eio docs: Correct the wrong API group name and typo in Evas, Eet, Eina, Eio and Elementary 2020-07-14 10:09:22 +01:00
eldbus Fix typos - (Part #5) 2020-06-25 09:03:07 +02:00
elementary elm_theme: more secure check extension as '.edj' and not 'edj' 2020-08-31 11:16:40 +02:00
elput elput - support libelogind.so.0 as well as libelogind-shared.so.0 2020-08-04 09:41:39 +01:00
elua elua: add searchpath impl for 5.1 compat 2020-07-31 19:01:59 +02:00
embryo Get rid of trailing whitespaces (11 / 14) 2020-06-23 10:31:05 +02:00
emile refactor build 2020-05-27 11:06:46 +02:00
emotion emotion: remove all left overs from removed backends 2020-06-05 12:47:43 +02:00
eo eo: set idx on exit to 1 not to 0 2020-08-12 11:18:10 +02:00
eolian Fix typos - (Part #5) 2020-06-25 09:03:07 +02:00
eolian_cxx cxx: Fix uses of intrinsic eolian binbuf type 2020-06-09 10:29:32 +02:00
ephysics refactor build 2020-05-27 11:06:46 +02:00
ethumb Get rid of trailing whitespaces (11 / 14) 2020-06-23 10:31:05 +02:00
ethumb_client Get rid of trailing whitespaces (11 / 14) 2020-06-23 10:31:05 +02:00
evas evas_textblock: remove style padding from native width and formatted height 2020-09-01 19:39:13 +09:00
evil Evil: add gettimeofday() 2020-08-31 14:24:08 +02:00
.gitignore