Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: coords.c tclass.c tclass.h Log Message: Smoother geometry indicator. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/coords.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -3 -r1.34 -r1.35 --- coords.c 12 Oct 2005 17:20:42 -0000 1.34 +++ coords.c 15 Oct 2005 12:14:00 -0000 1.35 @@ -65,6 +65,11 @@ cw += pad->left + pad->right; ch += pad->top + pad->bottom; + /* Width hysteresis (hack - assuming horizontal text) */ + cw += 8; + if (eo && abs(eo->w - cw) < 8) + cw = eo->w; + if (Mode.mode == MODE_MOVE) md = Conf.movres.mode_move; else @@ -98,15 +103,28 @@ if (!eo) return; coord_eo = eo; + + /* Center text (override theme) */ + TextclassSetJustification(tc, 512); } +#define TEST_COORD_REPARENT_TO_FRAME 0 +#if TEST_COORD_REPARENT_TO_FRAME + cx -= x; + cy -= y; +#endif EobjMoveResize(eo, cx, cy, cw, ch); if (!eo->shown) - EobjMap(eo, 0); + { +#if TEST_COORD_REPARENT_TO_FRAME + EobjReparent(eo, EoObj(ewin), cx, cy); +#endif + EobjMap(eo, 0); + } - ImageclassApply(ic, eo->win, cw, ch, 1, 0, STATE_NORMAL, 0, ST_UNKNWN); - TextclassApply(ic, eo->win, cw, ch, 0, 0, STATE_NORMAL, 0, tc, s); + ITApply(eo->win, ic, NULL, cw, ch, STATE_NORMAL, 1, 0, 0, ST_UNKNWN, + tc, NULL, s); EFlush(); } @@ -117,5 +135,10 @@ EObj *eo = coord_eo; if (eo && eo->shown) - EobjUnmap(eo); + { + EobjUnmap(eo); +#if TEST_COORD_REPARENT_TO_FRAME + EobjReparent(eo, EoObj(DeskGet(0)), 0, 0); +#endif + } } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/tclass.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -3 -r1.35 -r1.36 --- tclass.c 26 Sep 2005 17:32:10 -0000 1.35 +++ tclass.c 15 Oct 2005 12:14:00 -0000 1.36 @@ -152,6 +152,12 @@ return tc->justification; } +void +TextclassSetJustification(TextClass * tc, int just) +{ + tc->justification = just; +} + static void TextclassPopulate(TextClass * tclass) { =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/tclass.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- tclass.h 26 Sep 2005 17:32:10 -0000 1.1 +++ tclass.h 15 Oct 2005 12:14:00 -0000 1.2 @@ -79,6 +79,7 @@ void TextclassIncRefcount(TextClass * tc); void TextclassDecRefcount(TextClass * tc); int TextclassGetJustification(TextClass * tc); +void TextclassSetJustification(TextClass * tc, int just); TextClass *TextclassFind(const char *name, int fallback); void TextclassApply(struct _imageclass *ic, Window win, int w, int h, int active, int sticky, int state, ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs