forked from enlightenment/enlightenment
wallpaper previews now maintain aspect ratio when resized
ticket #1981 SVN revision: 80735
This commit is contained in:
parent
0e0188a3d3
commit
a04ef6cce1
|
@ -405,7 +405,7 @@ _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
static Evas_Object *
|
static Evas_Object *
|
||||||
_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
Evas_Object *o, *rt, *ot;
|
Evas_Object *o, *rt, *ot, *oa;
|
||||||
Evas_Object *ow;
|
Evas_Object *ow;
|
||||||
E_Zone *zone = NULL;
|
E_Zone *zone = NULL;
|
||||||
E_Radio_Group *rg;
|
E_Radio_Group *rg;
|
||||||
|
@ -475,11 +475,14 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
mw = 320;
|
mw = 320;
|
||||||
mh = (320 * zone->h) / zone->w;
|
mh = (320 * zone->h) / zone->w;
|
||||||
|
oa = e_widget_aspect_add(evas, mw, mh);
|
||||||
ow = e_widget_preview_add(evas, mw, mh);
|
ow = e_widget_preview_add(evas, mw, mh);
|
||||||
|
evas_object_size_hint_min_set(ow, mw, mh);
|
||||||
cfdata->o_preview = ow;
|
cfdata->o_preview = ow;
|
||||||
_bg_set(cfdata);
|
_bg_set(cfdata);
|
||||||
|
e_widget_aspect_child_set(oa, ow);
|
||||||
evas_object_show(ow);
|
evas_object_show(ow);
|
||||||
e_widget_table_object_append(ot, ow, 0, 2, 2, 1, 1, 1, 1, 1);
|
e_widget_table_object_append(ot, oa, 0, 2, 2, 1, 1, 1, 1, 1);
|
||||||
e_widget_list_object_append(o, ot, 1, 1, 0.5);
|
e_widget_list_object_append(o, ot, 1, 1, 0.5);
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
@ -522,7 +525,7 @@ _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
static Evas_Object *
|
static Evas_Object *
|
||||||
_adv_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
_adv_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
Evas_Object *o, *rt, *ot;
|
Evas_Object *o, *rt, *ot, *oa;
|
||||||
Evas_Object *ow, *of;
|
Evas_Object *ow, *of;
|
||||||
E_Zone *zone = NULL;
|
E_Zone *zone = NULL;
|
||||||
E_Radio_Group *rg;
|
E_Radio_Group *rg;
|
||||||
|
@ -585,11 +588,14 @@ _adv_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
mw = 320;
|
mw = 320;
|
||||||
mh = (320 * zone->h) / zone->w;
|
mh = (320 * zone->h) / zone->w;
|
||||||
|
oa = e_widget_aspect_add(evas, mw, mh);
|
||||||
ow = e_widget_preview_add(evas, mw, mh);
|
ow = e_widget_preview_add(evas, mw, mh);
|
||||||
|
evas_object_size_hint_min_set(ow, mw, mh);
|
||||||
evas_object_size_hint_aspect_set(ow, EVAS_ASPECT_CONTROL_BOTH, zone->w, zone->h);
|
evas_object_size_hint_aspect_set(ow, EVAS_ASPECT_CONTROL_BOTH, zone->w, zone->h);
|
||||||
cfdata->o_preview = ow;
|
cfdata->o_preview = ow;
|
||||||
_bg_set(cfdata);
|
_bg_set(cfdata);
|
||||||
e_widget_table_object_append(ot, ow, 0, 2, 2, 1, 1, 1, 1, 1);
|
e_widget_aspect_child_set(oa, ow);
|
||||||
|
e_widget_table_object_append(ot, oa, 0, 2, 2, 1, 1, 1, 1, 1);
|
||||||
|
|
||||||
rg = e_widget_radio_group_new(&(cfdata->all_this_desk_screen));
|
rg = e_widget_radio_group_new(&(cfdata->all_this_desk_screen));
|
||||||
of = e_widget_frametable_add(evas, _("Where to place the Wallpaper"), 0);
|
of = e_widget_frametable_add(evas, _("Where to place the Wallpaper"), 0);
|
||||||
|
|
Loading…
Reference in New Issue