Page MenuHomePhabricator

evas_textblock: <ps> tag respects multiline propertie
Needs ReviewPublic

Authored by ali.alzyod on Fri, May 31, 4:25 PM.

Details

Reviewers
woohyun
bowonryu
Summary

previously multi-line property does not effect <ps> tag.
now <ps> is treated visually like <br> when multiline is set to EINA_FALSE

this issue was that each new paragraph will create new line regardless of multi line property value, now only first paragraph will create new line if multi-line property is false, and other paragraphs will use same line

this will also fix the following patch https://phab.enlightenment.org/D8603
And both will use same test suite code

Test Plan
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1

#include <Eina.h>
#include <Elementary.h>
#include <Efl_Ui.h>

static void
_gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
   efl_exit(0);
}

static void
_gui_setup()
{
   Eo *win, *box;

   win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
                 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
                 efl_text_set(efl_added, "Hello World"),
                 efl_ui_win_autodel_set(efl_added, EINA_TRUE));

   // when the user clicks "close" on a window there is a request to delete
   efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);

   box = efl_add(EFL_UI_BOX_CLASS, win,
                efl_content_set(win, efl_added),
                efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));

   efl_add(EFL_UI_TEXT_CLASS, box,
           efl_text_markup_set(efl_added, 
           "paragraph1 <br>"
           "paragraph1 - line break <ps>"
           "paragraph2 <ps>"
           "paragraph3 <ps>"
           "paragraph4 <ps>"
           "paragraph5 "),
           efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE),
           efl_gfx_hint_weight_set(efl_added, 1.0, 0.9),
           efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
           efl_text_multiline_set(efl_added,EINA_FALSE),
           efl_pack(box, efl_added));

   efl_add(EFL_UI_BUTTON_CLASS, box,
           efl_text_set(efl_added, "Quit"),
           efl_gfx_hint_weight_set(efl_added, 1.0, 0.1),
           efl_pack(box, efl_added),
           efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
                                  _gui_quit_cb, efl_added));
}

EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
   _gui_setup();
}
EFL_MAIN()

Diff Detail

Repository
rEFL core/efl
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11713
Build 8748: arc lint + arc unit
ali.alzyod created this revision.Fri, May 31, 4:25 PM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

ali.alzyod requested review of this revision.Fri, May 31, 4:25 PM
ali.alzyod edited the summary of this revision. (Show Details)Fri, May 31, 4:31 PM
ali.alzyod edited the test plan for this revision. (Show Details)
ali.alzyod added reviewers: woohyun, bowonryu.
ali.alzyod edited the summary of this revision. (Show Details)
ali.alzyod updated this revision to Diff 22640.Fri, May 31, 4:34 PM
ali.alzyod edited the summary of this revision. (Show Details)
This comment was removed by ali.alzyod.
ali.alzyod edited the summary of this revision. (Show Details)Fri, May 31, 6:36 PM
ali.alzyod edited the summary of this revision. (Show Details)
ali.alzyod edited the summary of this revision. (Show Details)
ali.alzyod abandoned this revision.Sun, Jun 2, 9:23 PM
ali.alzyod changed the visibility from "Public (No Login Required)" to "No One".
ali.alzyod reclaimed this revision.Tue, Jun 4, 7:31 AM
ali.alzyod changed the visibility from "No One" to "Public (No Login Required)".