Enlightenment CVS committal Author : handyande Project : misc Module : engage
Dir : misc/engage/src/module Modified Files: e_mod_main.c tray.c Log Message: Update tray layout routine, better not quite perfect, but purfectly usable now :) =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/module/e_mod_main.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -3 -r1.55 -r1.56 --- e_mod_main.c 13 Jun 2005 13:10:53 -0000 1.55 +++ e_mod_main.c 13 Jun 2005 23:13:27 -0000 1.56 @@ -527,12 +527,12 @@ _engage_tray_init(eb); e_box_pack_end(eb->box_object, eb->tray->tray); - e_box_pack_options_set(o, + e_box_pack_options_set(eb->tray->tray, 1, 1, /* fill */ - 0, 0, /* expand */ - 0.5, 0.5, /* align */ - eb->tray->w, eb->tray->h, /* min */ - eb->tray->w, eb->tray->h /* max */ + 0, 1, /* expand */ + 0.0, 0.0, /* align */ + 1, 1, /* min */ + 100, 100 /* max */ ); eb->contexts = NULL; =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/module/tray.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- tray.c 13 Jun 2005 13:10:53 -0000 1.5 +++ tray.c 13 Jun 2005 23:13:27 -0000 1.6 @@ -158,35 +158,50 @@ eb = data; evas_object_resize(o, w, h); - e_box_pack_options_set(o, - 1, 1, /* fill */ - 0, 0, /* expand */ - 0.5, 0.5, /* align */ - w, h, /* min */ - w, h /* max */ - ); - ecore_x_window_resize(eb->tray->win, (int) w, (int) h); + _engage_tray_layout(eb); } static void _engage_tray_layout(Engage_Bar *eb) { - Evas_Coord w, h; + Evas_Coord w, h, c, d; int x, y; Evas_List *wins; - /* FIXME - this is a simple placeholder - need to check the height of the - * bar and the orientation... */ - h = 24; - w = eb->tray->icons * 24; + h = eb->engage->conf->iconsize; + if (h < 24) + h = 24; + c = (h - (h % 24)) / 24; + w = ((eb->tray->icons + (eb->tray->icons % c)) / c) * 24; + if (w == 0) + w = 1; + evas_object_resize(eb->tray->tray, w, h); + ecore_x_window_resize(eb->tray->win, (int) w, (int) h); + + e_box_pack_options_set(eb->tray->tray, + 1, 1, /* fill */ + 0, 1, /* expand */ + 0.0, 0.0, /* align */ + w, h, /* min */ + w, h /* max */ + ); x = 0; - y = 0; + y = eb->h - 24; + d = 0; for (wins = eb->tray->wins; wins; wins = wins->next) { ecore_x_window_move((Ecore_X_Window) wins->data, x, y); - x += 24; + d++; + if (d % c == 0) + { + x += 24; + y = eb->h - 24; + } + else + y -= 24; + } } ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs