2016-05-26 14:11 GMT+02:00 Daniel Christopher Würl <[email protected]>:

> 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;
>
>            }
>          }
>       }
>    }
> }
>
>
I'm not really sure you can use the box contents for sizing other parts
inside edje,
your code seems correct. The only thing I would try is to set "min: 1 1" in
the
box properties.

SPACER parts are just a special type that is only used for sizing, that is:
the part
will not get any rendering but can be used to sizing other parts that are
relative to
the spacer one.



>
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-users
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
enlightenment-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-users

Reply via email to