Hi everyone, I'm not too sure if this fits here, but I figured <enlightenment-devel> is about developing enlightenment, so I didn't want to disturb... If this should belong there and not here, my sincere apologies.
I'm toying around with python-efl and custom layouts for the past few days, and actually produce some nice windows... ;) What bugs me is the edje-layout thingy, and I'm quite sure I just miss some piece of information here. I can create an edc file, create some groups and parts, and it shows on the screen, no sweat here. But somehow I don't get the size-aquisition. How do I get a part to have the right size for its content? I did the "backwards-jump" the dark themes does sometimes, i.e. defining an image part and making it rel to the later declared text. Works like a charm. Then define a box, and rel the rel2 of the image to this, but it won't recognize the boxes content, just display as if the box has no size, so the boxes content simply do overflow. I'm jumping all over https://docs.enlightenment.org/stable/efl/edcref.html and https://docs.enlightenment.org/python-efl/current/elementary/layout.html, but there are just some things I don't get (for example, what is a SPACER-part? edcref seems a bit underexplained...). Is there another source of information I could tap into? Or could someone tell me in a short sentence what I do wrong? A big thanks in advance. Here is the edc and python (shortened, of course): edc: group { name: "kara/popup/bg"; part { name: "bg"; description { state: "default" 0.0; image.normal: "darken_square.png"; image.border: 3 3 3 3; fill.smooth: 1; rel1.to: message; rel2.to: content; rel1.relative: 0.0 0.0; rel2.relative: 1.0 1.0; rel1.offset: -20 -20; rel2.offset: 20 20; //align: 0.5 0.5; } } part { name: "message"; type: TEXTBLOCK; description { state: "default" 0.0; min: 640 80; max: 640 0; rel1.relative: 0.0 0.0; rel2.relative: 1.0 1.0; rel1.offset: 60 60; rel2.offset: -60 -60; //align: 0.0 0.0; text { style: "kara_default_style"; min: 0 1; max: 0 1; ellipsis: -1; } } } part { name: "content"; type: BOX; description { state: "default" 0.0; min: 640 0; max: 640 0; rel1.to: message; rel2.to: message; rel1.relative: 0.0 1.0; rel2.relative: 1.0 1.0; //rel1.offset: -20 -20; rel2.offset: 0 -60; //align: 0.5 0.0; box { layout: "vertical"; padding: 0 2; align: 0.5 0.0; min: 0 1; } } } } } python: win = StandardWindow( "kara", "Kara") win.callback_delete_request_add(lambda o: elm.exit()) layout = Layout(win) layout.file_set('default.edj', 'kara/popup/bg') layout.size_hint_weight_set( EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) nbutton = Button(win) nbutton.text = 'Foobar' nbutton.size_hint_weight = ( EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) nbutton.show() layout.box_append('content', nbutton) layout2.text_set( 'message', "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ") win.resize_object_add(layout2) layout2.show() win.show() ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j _______________________________________________ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users