Find attached a test case for this bug. edje_cc test.edc gcc -o test test.c `pkg-config --cflags --libs elementary` ./test
then click the red rectangle. It will turn green and the entry will not recalculate as it should, even having enough space there will be scrollbars. If you resize the window HORIZONTALLY then the scrollbars go away. In this case if you click the green bar it will turn red and the contents will not be aligned anymore. Resize HORIZONTALLY and it will fix. BR, -- Gustavo On Sun, Aug 19, 2012 at 12:24 PM, Gustavo Sverzut Barbieri < barbi...@profusion.mobi> wrote: > Hi all, > > I can't provide a sample test right now, sorry. I hope the explanation > is enough to someone that could fix it can check: > > I have a layout inside a window as resize object. It will resize a > swallow object using signals. > > In this swallow I place an elm_entry with scroll = TRUE, horiz = OFF, > vert = AUTO. > > I wrote an entry style with base textblock style having: > "valign=middle align=center" to show the text in the center. I have > the textblock part defined as: "text { min: 0 1; max: 1 1; align: 0.5 > 0.5; }" > > whenever I set a text, it's never centered. Sometimes it's at the top, > sometimes it creates scrollbars... even if the text is one or two > lines in height. > > If I add a timer of 0.02s to call elm_entry_calc_force() it will work. > > If I resize the window (grow on width, height does not matter), it > will fix. I can resize it back to original value and it works. > > Ideas, > > -- > Gustavo Sverzut Barbieri > http://profusion.mobi embedded systems > -------------------------------------- > MSN: barbi...@gmail.com > Skype: gsbarbieri > Mobile: +55 (19) 9225-2202 > -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202
#include <Elementary.h> int main(int argc, char *argv[]) { Evas_Object *win, *lay, *en; elm_init(argc, argv); elm_theme_extension_add(NULL, "./test.edj"); win = elm_win_util_standard_add("test", "Test Entry Bug"); lay = elm_layout_add(win); if (!elm_layout_theme_set(lay, "layout", "base", "TEST")) { fprintf(stderr, "ERR: could not load theme.\n"); return 1; } evas_object_size_hint_weight_set(lay, 1.0, 1.0); elm_win_resize_object_add(win, lay); evas_object_show(lay); en = elm_entry_add(lay); elm_object_style_set(en, "TEST"); elm_entry_editable_set(en, EINA_FALSE); elm_entry_scrollable_set(en, EINA_TRUE); elm_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); elm_object_text_set(en, "Should Be Centered"); elm_object_part_content_set(lay, "swallow", en); evas_object_show(win); evas_object_resize(win, 400, 400); elm_run(); return 0; }
test.edc
Description: Binary data
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel