From 7f422515a1a1aa94e5724c585ce75f3256e1ec23 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 4 Apr 2006 09:54:50 +0000 Subject: [PATCH] different shelf look - imho much nicer now. work on some mroe shelf stuff - like autofit. i need to add a lot more hooks for things and info. SVN revision: 21802 --- data/themes/default_shelf.edc | 252 ++++++-------------------- data/themes/images/Makefile.am | 4 +- data/themes/images/e17_shelf_bg_h.png | Bin 0 -> 6178 bytes data/themes/images/e17_shelf_sh_h.png | Bin 0 -> 1093 bytes src/bin/e_gadcon.c | 29 ++- src/bin/e_gadcon.h | 1 + src/bin/e_shelf.c | 85 ++++++++- src/modules/start/e_mod_main.c | 1 + 8 files changed, 162 insertions(+), 210 deletions(-) create mode 100644 data/themes/images/e17_shelf_bg_h.png create mode 100644 data/themes/images/e17_shelf_sh_h.png diff --git a/data/themes/default_shelf.edc b/data/themes/default_shelf.edc index fc9ec3d1b..619cee870 100644 --- a/data/themes/default_shelf.edc +++ b/data/themes/default_shelf.edc @@ -1,14 +1,6 @@ images { - image: "e17_shelf1.png" COMP; - image: "e17_shelf2.png" COMP; - image: "e17_shelf3.png" COMP; - image: "e17_shelf4.png" COMP; - image: "e17_shelf5.png" COMP; - image: "e17_shelf6.png" COMP; - image: "e17_shelf_bg1.png" COMP; - image: "e17_shelf_bg2.png" COMP; - image: "e17_shelf_sh1.png" COMP; - image: "e17_shelf_sh2.png" COMP; + image: "e17_shelf_bg_h.png" COMP; + image: "e17_shelf_sh_h.png" COMP; } group { @@ -19,71 +11,71 @@ group { } parts { part { - name: "base"; + name: "shadow"; mouse_events: 0; - type: RECT; description { state: "default" 0.0; + visible: 0; rel1 { - relative: 0.0 1.0; - offset: 0 0; - to: "base2"; + to: "base"; + relative: 0.0 0.0; + offset: -5 -5; } rel2 { - to_x: "base2"; + to: "base"; relative: 1.0 1.0; - offset: -1 -2; + offset: 12 12; + } + image { + normal: "e17_shelf_sh_h.png"; + border: 19 19 19 19; + } + fill { + smooth: 0; } - color: 221 221 221 255; } } part { - name: "base2"; - mouse_events: 0; + name: "base"; + clip_to: "base_clip"; description { state: "default" 0.0; rel1 { relative: 0.0 0.0; - offset: 32 0; + offset: 0 -6; } rel2 { - relative: 1.0 0.0; - offset: -33 19; + relative: 1.0 1.0; + offset: -1 0; } image { - normal: "e17_shelf_bg1.png"; + normal: "e17_shelf_bg_h.png"; + border: 19 19 9 9; } - fill { - smooth: 0; - size { - relative: 1.0 0; - offset: 0 20; - } + } + description { + state: "bottom" 0.0; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 { + relative: 1.0 1.0; + offset: -1 7; + } + image { + normal: "e17_shelf_bg_h.png"; + border: 19 19 9 9; } } } part { - name: "base3"; + name: "base_clip"; + type: RECT; mouse_events: 0; description { state: "default" 0.0; - max: 99999 20; - rel1 { - to_x: "base2"; - relative: 0.0 1.0; - offset: 0 -1; - } - rel2 { - to_x: "base2"; - relative: 1.0 1.0; - offset: -1 -1; - } - image { - normal: "e17_shelf_bg2.png"; - } - fill { - smooth: 0; - } + color: 255 255 255 255; } } part { @@ -94,157 +86,29 @@ group { state: "default" 0.0; rel1 { relative: 0.0 0.0; - offset: 32 2; + offset: 18 2; } rel2 { relative: 1.0 1.0; - offset: -33 -3; - } - } - } - part { - name: "sh1"; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { - to_x: "base2"; - relative: 0.0 0.0; - offset: 0 0; - } - rel2 { - to_x: "base2"; - relative: 0.0 1.0; - offset: 9 -1; - } - image { - normal: "e17_shelf_sh1.png"; - } - } - } - part { - name: "sh2"; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { - to_x: "base2"; - relative: 1.0 0.0; - offset: -10 0; - } - rel2 { - to_x: "base2"; - relative: 1.0 1.0; - offset: -1 -1; - } - image { - normal: "e17_shelf_sh2.png"; - } - } - } - part { - name: "resize_l"; - description { - state: "default" 0.0; - rel1 { - relative: 0.0 0.0; - offset: 0 0; - } - rel2 { - relative: 0.0 0.0; - offset: 31 9; - } - image { - normal: "e17_shelf1.png"; - } - } - } - part { - name: "drag1"; - description { - state: "default" 0.0; - rel1 { - relative: 0.0 0.0; - offset: 0 10; - } - rel2 { - relative: 0.0 1.0; - offset: 31 -11; - } - image { - normal: "e17_shelf2.png"; - border: 4 4 4 4; - } - } - } - part { - name: "resize_b1"; - description { - state: "default" 0.0; - rel1 { - relative: 0.0 1.0; - offset: 0 -10; - } - rel2 { - relative: 0.0 1.0; - offset: 31 -1; - } - image { - normal: "e17_shelf3.png"; - } - } - } - part { - name: "resize_r"; - description { - state: "default" 0.0; - rel1 { - relative: 1.0 0.0; - offset: -32 0; - } - rel2 { - relative: 1.0 0.0; - offset: -1 9; - } - image { - normal: "e17_shelf4.png"; - } - } - } - part { - name: "drag2"; - description { - state: "default" 0.0; - rel1 { - relative: 1.0 0.0; - offset: -32 10; - } - rel2 { - relative: 1.0 1.0; - offset: -1 -11; - } - image { - normal: "e17_shelf5.png"; - border: 4 4 4 4; - } - } - } - part { - name: "resize_b2"; - description { - state: "default" 0.0; - rel1 { - relative: 1.0 1.0; - offset: -32 -10; - } - rel2 { - relative: 1.0 1.0; - offset: -1 -1; - } - image { - normal: "e17_shelf6.png"; + offset: -19 -3; } } } } + programs { + program { + name: "orient1"; + signal: "set_orientation"; + source: "top"; + action: STATE_SET "default" 0.0; + target: "base"; + } + program { + name: "orient2"; + signal: "set_orientation"; + source: "bottom"; + action: STATE_SET "bottom" 0.0; + target: "base"; + } + } } diff --git a/data/themes/images/Makefile.am b/data/themes/images/Makefile.am index a8a335a0c..a102def1d 100644 --- a/data/themes/images/Makefile.am +++ b/data/themes/images/Makefile.am @@ -427,4 +427,6 @@ e17_shelf6.png \ e17_shelf_bg1.png \ e17_shelf_bg2.png \ e17_shelf_sh1.png \ -e17_shelf_sh2.png +e17_shelf_sh2.png \ +e17_shelf_bg_h.png \ +e17_shelf_sh_h.png diff --git a/data/themes/images/e17_shelf_bg_h.png b/data/themes/images/e17_shelf_bg_h.png new file mode 100644 index 0000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QOOm{0et>cl+t{|M>i$cM|?&ndcSwg+Z^c&NJQK-r?r@7O!7lyVmzM-sdWBJHOka zXa|$Q=^tG8Hf57r+$$7j>E|kmpF#JBL3M;;b-6>~fqG1Mr56+jpDK?c^NtU&>{sQN zf&|12#>Ikf*5>}Ltc;TLeJ^)lvp%NV>&_(35;r%uxW2i@_3P^mLbk?<xBbjmoli<4m zpW6L%xD0}B`)UEc{N0!M?QedIZ_N7kmntp`ZtiaJ{ONOi{p=}Ty?A;5s6I@?kLf0|_g>I<|o4gdfE07*qoM6N<$g0zg; AbpQYW literal 0 HcmV?d00001 diff --git a/data/themes/images/e17_shelf_sh_h.png b/data/themes/images/e17_shelf_sh_h.png new file mode 100644 index 0000000000000000000000000000000000000000..060f0b06e21bb8cb7220850f33fc068fd7e043bc GIT binary patch literal 1093 zcmV-L1iJf)P)Baj00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru)&v9yFAMpM)K~xj03CEi zSad^gZEa<4bO1wgWnpw>WFU8GbZ8({Xk{QrNlj4iWF>9@00XH>L_t(|+U?zcZ`&Xc z#_@yTrrY~}uWRha-apV@FK|HGt&8@3B$SG|wlsZu{BR^h2zh{n2fa7>cXNCvrf?@f zu!3~t+V1bAL1@AJJcDw z(wg^34$^}1RB0M)03{i~dl;bCO4DEu4{8l*5|Jghlv@GoK?N@rwFb4Ie9djkP3H!y zS5XVnr`*o@b7^1&D(OMhNH-B#)yS-`4PHgH^U_mB`6MFGBJv|+Ju9rS@*toBwboaL z^@8-04F!XFS6JWf=MDV@>Nz9*nLnR1-lXQMKqVtkOEq1ytyAUS%Um^#4E@mz{TAz! zdQfCRMFtj91>%(%uA0n_(yoVp zucAh^%3oAveOB{SDk_<+sL>$RyGgNEQEerxVNC`u6_w0ZR6X2VQx<9PpnB7QlbR0L z&3~Yh9@L;JY0Z%P0%_)5e{>p9Ne^oItl8Ax7nXQ`2dD~(gS$N7ktYuPCO8hG$gnU(X zb^Fs`X&&hhpe6$lXKmd;^?tF}T1T`HaE==C47#VH*c=X)Edxo zv#V;a@_xvw9rl4rJgC}`HdRCGLOm*f0k4&|NLQss0HdO@8_$RO1i1O*gy(gs;Ot{C1Wj>RYM(`qgwqMV(DAdf(oc)6zXn9>5Ia; z8K})U>d}}_=#6|^VNcGm4^*Jq0(do3%GJzOudUU8>fF@+MQjbEKqVtkE!F~7&rzqg zr}j$!RRN7=5d}&zvY=}1&A0YbyH!sEjFlGD4uE$LLPf0=!Pc9q=7ztADGW3~l3Bo` z@BOE$UNC575-5nNrXE-k|4S*;kiwn#fC|)+Yme`Q1X8dP@_*$wcSp66KAUA|00000 LNkvXXu0mjfs@3V; literal 0 HcmV?d00001 diff --git a/src/bin/e_gadcon.c b/src/bin/e_gadcon.c index 8da69c371..c5eda1acd 100644 --- a/src/bin/e_gadcon.c +++ b/src/bin/e_gadcon.c @@ -75,7 +75,13 @@ __test2(E_Gadcon_Client *gcc) static void __test3(E_Gadcon_Client *gcc) { - e_gadcon_client_min_size_set(gcc, 80, 20); + e_gadcon_client_min_size_set(gcc, 200, 20); +} + +static void +__test4(E_Gadcon_Client *gcc) +{ + e_gadcon_client_min_size_set(gcc, 32, 20); } /* externally accessible functions */ @@ -101,7 +107,7 @@ e_gadcon_init(void) GADCON_CLIENT_CLASS_VERSION, "clock", { - __test, __test2, NULL + __test, __test2, __test4 } }; e_gadcon_provider_register(&cc); @@ -154,6 +160,17 @@ e_gadcon_swallowed_new(const char *name, char *id, Evas_Object *obj, char *swall return gc; } +EAPI void +e_gadcon_swallowed_min_size_set(E_Gadcon *gc, Evas_Coord w, Evas_Coord h) +{ + if (gc->edje.o_parent) + { + edje_extern_object_min_size_set(gc->o_container, w, h); + edje_object_part_swallow(gc->edje.o_parent, gc->edje.swallow_name, + gc->o_container); + } +} + EAPI void e_gadcon_size_request_callback_set(E_Gadcon *gc, void (*func) (void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h), void *data) { @@ -591,14 +608,6 @@ _e_gadcon_cb_size_request(void *data, Evas *e, Evas_Object *obj, void *event_inf Evas_Coord w, h; e_gadcon_layout_min_size_get(gc->o_container, &w, &h); - /* FIXME: this needs to be controlled */ - if (gc->edje.o_parent) - { - edje_extern_object_min_size_set(gc->o_container, w, h); - edje_object_part_swallow(gc->edje.o_parent, gc->edje.swallow_name, - gc->o_container); - } - printf("new minh/h\n"); gc->resize_request.func(gc->resize_request.data, gc, w, h); } } diff --git a/src/bin/e_gadcon.h b/src/bin/e_gadcon.h index 619e33a28..1e63885c0 100644 --- a/src/bin/e_gadcon.h +++ b/src/bin/e_gadcon.h @@ -100,6 +100,7 @@ EAPI int e_gadcon_shutdown(void); EAPI void e_gadcon_provider_register(E_Gadcon_Client_Class *cc); EAPI void e_gadcon_provider_unregister(E_Gadcon_Client_Class *cc); EAPI E_Gadcon *e_gadcon_swallowed_new(const char *name, char *id, Evas_Object *obj, char *swallow_name); +EAPI void e_gadcon_swallowed_min_size_set(E_Gadcon *gc, Evas_Coord w, Evas_Coord h); EAPI void e_gadcon_size_request_callback_set(E_Gadcon *gc, void (*func) (void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h), void *data); EAPI void e_gadcon_layout_policy_set(E_Gadcon *gc, E_Gadcon_Layout_Policy layout_policy); EAPI void e_gadcon_populate(E_Gadcon *gc); diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c index f242307dd..283fa4ec6 100644 --- a/src/bin/e_shelf.c +++ b/src/bin/e_shelf.c @@ -130,7 +130,7 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i es->ee = zone->container->bg_ecore_evas; es->evas = zone->container->bg_evas; } -// es->fit_along = 1; + es->fit_along = 1; es->layer = layer; es->zone = zone; es->style = evas_stringshare_add(style); @@ -159,6 +159,7 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i e_gadcon_size_request_callback_set(es->gadcon, _e_shelf_gadcon_size_request, es); e_gadcon_orient(es->gadcon, E_GADCON_ORIENT_TOP); + edje_object_signal_emit(es->o_base, "set_orientation", "top"); e_gadcon_zone_set(es->gadcon, zone); e_gadcon_ecore_evas_set(es->gadcon, es->ee); @@ -353,6 +354,44 @@ e_shelf_orient(E_Shelf *es, E_Gadcon_Orient orient) E_OBJECT_CHECK(es); E_OBJECT_TYPE_CHECK(es, E_GADMAN_SHELF_TYPE); e_gadcon_orient(es->gadcon, orient); + switch (es->gadcon->orient) + { + case E_GADCON_ORIENT_FLOAT: + edje_object_signal_emit(es->o_base, "set_orientation", "float"); + break; + case E_GADCON_ORIENT_HORIZ: + edje_object_signal_emit(es->o_base, "set_orientation", "horizontal"); + break; + case E_GADCON_ORIENT_VERT: + edje_object_signal_emit(es->o_base, "set_orientation", "vertical"); + break; + case E_GADCON_ORIENT_LEFT: + edje_object_signal_emit(es->o_base, "set_orientation", "left"); + break; + case E_GADCON_ORIENT_RIGHT: + edje_object_signal_emit(es->o_base, "set_orientation", "right"); + break; + case E_GADCON_ORIENT_TOP: + edje_object_signal_emit(es->o_base, "set_orientation", "top"); + break; + case E_GADCON_ORIENT_BOTTOM: + edje_object_signal_emit(es->o_base, "set_orientation", "bottom"); + break; + case E_GADCON_ORIENT_CORNER_TL: + edje_object_signal_emit(es->o_base, "set_orientation", "top_left"); + break; + case E_GADCON_ORIENT_CORNER_TR: + edje_object_signal_emit(es->o_base, "set_orientation", "top_right"); + break; + case E_GADCON_ORIENT_CORNER_BL: + edje_object_signal_emit(es->o_base, "set_orientation", "bottom_left"); + break; + case E_GADCON_ORIENT_CORNER_BR: + edje_object_signal_emit(es->o_base, "set_orientation", "bottom_right"); + break; + default: + break; + } } /* local subsystem functions */ @@ -412,15 +451,51 @@ static void _e_shelf_gadcon_size_request(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h) { E_Shelf *es; - Evas_Coord nx, ny, nw, nh; + Evas_Coord nx, ny, nw, nh, ww, hh; es = data; nx = es->x; ny = es->y; nw = es->w; nh = es->h; + ww = hh = 0; + printf("req min = %i %i\n", w, h); + evas_object_geometry_get(gc->o_container, NULL, NULL, &ww, &hh); + switch (gc->orient) + { + case E_GADCON_ORIENT_FLOAT: + break; + case E_GADCON_ORIENT_HORIZ: + break; + case E_GADCON_ORIENT_VERT: + break; + case E_GADCON_ORIENT_LEFT: + break; + case E_GADCON_ORIENT_RIGHT: + break; + case E_GADCON_ORIENT_TOP: + if (!es->fit_along) w = ww; + if (!es->fit_size) h = hh; + break; + case E_GADCON_ORIENT_BOTTOM: + if (!es->fit_along) w = ww; + if (!es->fit_size) h = hh; + break; + case E_GADCON_ORIENT_CORNER_TL: + break; + case E_GADCON_ORIENT_CORNER_TR: + break; + case E_GADCON_ORIENT_CORNER_BL: + break; + case E_GADCON_ORIENT_CORNER_BR: + break; + default: + break; + } + printf("adj min = %i %i\n", w, h); + e_gadcon_swallowed_min_size_set(gc, w, h); edje_object_size_min_calc(es->o_base, &nw, &nh); - printf("new w, h = %i %i\n", nw, nh); + printf("new w, h = %i %i\n", nw, nh); switch (gc->orient) { case E_GADCON_ORIENT_FLOAT: @@ -438,7 +513,7 @@ _e_shelf_gadcon_size_request(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord if (!es->fit_size) nh = es->h; if (nw > es->zone->w) nw = es->zone->w; if (nh > es->zone->h) nh = es->zone->h; - if (nw != es->w) nx = es->x + ((es->w - es->w) / 2); + if (nw != es->w) nx = es->x + ((es->w - nw) / 2); ny = 0; break; case E_GADCON_ORIENT_BOTTOM: @@ -446,7 +521,7 @@ _e_shelf_gadcon_size_request(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord if (!es->fit_size) nh = es->h; if (nw > es->zone->w) nw = es->zone->w; if (nh > es->zone->h) nh = es->zone->h; - if (nw != es->w) nx = es->x + ((es->w - es->w) / 2); + if (nw != es->w) nx = es->x + ((es->w - nw) / 2); ny = es->zone->h - nh; break; case E_GADCON_ORIENT_CORNER_TL: diff --git a/src/modules/start/e_mod_main.c b/src/modules/start/e_mod_main.c index b93f9a1f2..cc8bd98c1 100644 --- a/src/modules/start/e_mod_main.c +++ b/src/modules/start/e_mod_main.c @@ -85,6 +85,7 @@ _gc_orient(E_Gadcon_Client *gcc) inst = gcc->data; printf("OREINT to %i\n", gcc->gadcon->orient); + e_gadcon_client_min_size_set(gcc, 20, 20); } /**/ /***************************************************************************/