forked from enlightenment/enlightenment
fix problem with resizing dialogs that use e_widget_framelist_object_append()
Now we have a new variant that lets you set the box pack options. Couple of modules need this. SVN revision: 46691
This commit is contained in:
parent
20dfdb3334
commit
90a385ff28
|
@ -52,6 +52,32 @@ e_widget_framelist_add(Evas *evas, const char *label, int horiz)
|
|||
return obj;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_widget_framelist_object_append_full(Evas_Object *obj, Evas_Object *sobj, int fill_w, int fill_h, int expand_w, int expand_h, double align_x, double align_y, Evas_Coord min_w, Evas_Coord min_h, Evas_Coord max_w, Evas_Coord max_h)
|
||||
{
|
||||
E_Widget_Data *wd;
|
||||
Evas_Coord mw = 0, mh = 0;
|
||||
|
||||
wd = e_widget_data_get(obj);
|
||||
|
||||
e_box_pack_end(wd->o_box, sobj);
|
||||
e_widget_size_min_get(sobj, &mw, &mh);
|
||||
e_box_pack_options_set(sobj,
|
||||
fill_w, fill_h,
|
||||
expand_w, expand_h,
|
||||
align_x, align_y,
|
||||
min_w, min_h,
|
||||
max_w, max_h
|
||||
);
|
||||
e_box_size_min_get(wd->o_box, &mw, &mh);
|
||||
edje_extern_object_min_size_set(wd->o_box, mw, mh);
|
||||
edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->o_box);
|
||||
edje_object_size_min_calc(wd->o_frame, &mw, &mh);
|
||||
e_widget_size_min_set(obj, mw, mh);
|
||||
e_widget_sub_object_add(obj, sobj);
|
||||
evas_object_show(sobj);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_widget_framelist_object_append(Evas_Object *obj, Evas_Object *sobj)
|
||||
{
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
EAPI Evas_Object *e_widget_framelist_add(Evas *evas, const char *label, int horiz);
|
||||
EAPI void e_widget_framelist_object_append(Evas_Object *obj, Evas_Object *sobj);
|
||||
EAPI void e_widget_framelist_object_append_full(Evas_Object *obj, Evas_Object *sobj, int fill_w, int fill_h, int expand_w, int expand_h, double align_x, double align_y, Evas_Coord min_w, Evas_Coord min_h, Evas_Coord max_w, Evas_Coord max_h);
|
||||
|
||||
EAPI void e_widget_framelist_content_align_set(Evas_Object *obj, double halign, double valign);
|
||||
EAPI void e_widget_framelist_label_set(Evas_Object *obj, const char *label);
|
||||
|
||||
|
|
|
@ -185,6 +185,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
{
|
||||
Evas_Object *o, *ilist, *of, *checkbox;
|
||||
struct _fill_icon_themes_data *d;
|
||||
Evas_Coord mw, mh;
|
||||
|
||||
o = e_widget_list_add(evas, 0, 0);
|
||||
of = e_widget_framelist_add(evas, _("Icon Themes"), 0);
|
||||
|
@ -195,8 +196,15 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
|
||||
e_widget_framelist_object_append(of, ilist);
|
||||
|
||||
checkbox = e_widget_check_add(evas, _("Icon theme overrides general theme"), &(cfdata->overrides));
|
||||
e_widget_framelist_object_append(of, checkbox);
|
||||
checkbox = e_widget_check_add(evas, _("This overrides general theme"), &(cfdata->overrides));
|
||||
e_widget_size_min_get(checkbox, &mw, &mh);
|
||||
e_widget_framelist_object_append_full(of, checkbox,
|
||||
1, 1, /* fill */
|
||||
1, 0, /* expand */
|
||||
0.5, 0.5, /* align */
|
||||
mw, mh, /* min */
|
||||
99999, 99999 /* max */
|
||||
);
|
||||
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
e_dialog_resizable_set(cfd->dia, 1);
|
||||
|
|
Loading…
Reference in New Issue