down when icon allowed to down-scale.
SVN revision: 38593
state: "default" 0.0;
align: 0.0 0.0;
min: 0 10;
+ fixed: 1 1;
rel1 {
to: "base";
relative: 0.0 1.0;
}
static void
+my_bt_23(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win, *bg;
+ char buf[PATH_MAX];
+
+ win = elm_win_add(NULL, "carousel", ELM_WIN_BASIC);
+ elm_win_title_set(win, "Carousel");
+ elm_win_autodel_set(win, 1);
+
+ bg = elm_bg_add(win);
+ elm_win_resize_object_add(win, bg);
+ evas_object_size_hint_weight_set(bg, 1.0, 1.0);
+ evas_object_show(bg);
+
+ evas_object_resize(win, 320, 240);
+ evas_object_show(win);
+}
+
+static void
my_win_main(void)
{
Evas_Object *win, *bg, *bx0, *lb, *bx, *bt, *sc, *fr;
elm_box_pack_end(bx, bt);
evas_object_show(bt);
+ bt = elm_button_add(win);
+ elm_button_label_set(bt, "Carousel");
+ evas_object_smart_callback_add(bt, "clicked", my_bt_23, NULL);
+ evas_object_size_hint_align_set(bt, -1.0, 0.0);
+ elm_box_pack_end(bx, bt);
+ evas_object_show(bt);
+
/* set an initial window size */
evas_object_resize(win, 320, 520);
/* show the window */
// * file selector widget
//
//// (improvements - low priority)
+// * need a way to set a preferred size of a widget (but not min or max).
// * merge with gurana
// * use evas's new box instead of a box smart
// * use evas's table instead of a table smart
Evas_Object *scr, *bx;
Eina_List *items;
int icon_size;
- Evas_Bool scrollable : 1;
};
struct _Item
evas_object_size_hint_min_get(wd->bx, &minw, &minh);
evas_object_resize(wd->bx, minw, minh);
elm_smart_scroller_child_viewport_size_get(wd->scr, &vw, &vh);
- if (wd->scrollable)
- {
- minw = 500 - vw;
- minh = minh + (500 - vh);
- }
- else
- {
- minw = minw + (500 - vw);
- minh = minh + (500 - vh);
- }
+ minw = minw + (500 - vw);
+ minh = minh + (500 - vh);
evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, maxw, maxh);
}
ELM_SMART_SCROLLER_POLICY_OFF);
wd->icon_size = 32;
- wd->scrollable = 1;
wd->bx = _els_smart_box_add(e);
_els_smart_box_orientation_set(wd->bx, 1);
}
if (it->icon)
{
+ edje_extern_object_aspect_set(it->icon, EDJE_ASPECT_CONTROL_VERTICAL, minw[0], minh[0]);
edje_extern_object_min_size_set(it->icon, minw[0], minh[0]);
edje_object_part_swallow(it->base, "elm.swallow.icon", it->icon);
}
if (it->end)
{
+ edje_extern_object_aspect_set(it->end, EDJE_ASPECT_CONTROL_VERTICAL, minw[1], minh[1]);
edje_extern_object_min_size_set(it->end, minw[1], minh[1]);
edje_object_part_swallow(it->base, "elm.swallow.end", it->end);
}