Modify ↓
Ticket #639 (closed TODO: Fixed)
Elementary Layout confusing API
| Reported by: | DaveMDS | Owned by: | raster |
|---|---|---|---|
| Priority: | Blocker | Milestone: | Elementary 1.0 |
| Component: | elementary | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: |
Description
Hi all ! I'm tring to use the new canned styles for the layout widget, IMO the new macro to set standard parts use wrong names, please follow the following code code:
// add a new layout widget ly = elm_layout_add(parent); // set the canned style for the layout (apps with titlebar style) elm_layout_theme_set(ly, 'layout', 'application', 'titlebar'); // set standard parts of the layout (elm.swallow.icon, elm.swallow.end, elm.swallow.text) elm_layout_icon_set(ly, icon_obj); elm_layout_end_set(ly, end_obj); elm_layout_text_set(ly, "mytitle"); // at this point, to set the content part of the layout (elm.swallow.content), you expect to use: elm_layout_content_set(ly, content_obj); // but this doesn't work... instead you have to do: elm_layout_content_set(ly, "elm.swallow.content", content_obj);
This is quite confusing, we should rename the elm_layout_content_set() func or all the new macros. Maybe the macros can be renamed to : elm_layout_standard_[icon/end/text]_set() elm_layout_standard_content_set() this is new ... 'standard' can also be 'canned' or something else
OR we can rename elm_layout_content_set() to: elm_layout_part_set() ??
What do you think guys? As it is now is REALLY confusing !
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

It's renamed to elm_object_part_content_set Now do you agree the API name?