Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: iclass.c setup.c tooltips.c Log Message: Transparency tweaks. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/iclass.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -3 -r1.39 -r1.40 --- iclass.c 14 Jun 2004 17:02:30 -0000 1.39 +++ iclass.c 18 Jun 2004 22:21:35 -0000 1.40 @@ -74,7 +74,7 @@ #else void -TransparencySet(int transparency) +TransparencySet(int transparency __UNUSED__) { } @@ -231,9 +231,6 @@ EAllocColor(&is->hihi); EAllocColor(&is->lolo); - if (is->transparent) - is->unloadable = 1; - EDBUG_RETURN_; } @@ -394,58 +391,56 @@ { int apply, trans; int ww, hh; - int flags; PmapMask pmml; #ifdef ENABLE_TRANSPARENCY Imlib_Image *ii = NULL; + int flags; - switch (image_type) + flags = ICLASS_ATTR_OPAQUE; + if (Conf.theme.transparency > 0) { - case ST_UNKNWN: - flags = ICLASS_ATTR_OPAQUE; - break; - case ST_BORDER: - flags = Conf.st_trans.border; - break; - case ST_WIDGET: - flags = Conf.st_trans.widget; - break; - case ST_ICONBOX: - flags = Conf.st_trans.iconbox; - break; - case ST_MENU: - flags = Conf.st_trans.menu; - break; - case ST_MENU_ITEM: - flags = Conf.st_trans.menu_item; - break; - case ST_TOOLTIP: - flags = Conf.st_trans.tooltip; - break; - case ST_DIALOG: - flags = Conf.st_trans.dialog; - break; - case ST_HILIGHT: - flags = Conf.st_trans.hilight; - break; - case ST_PAGER: - flags = Conf.st_trans.pager; - break; - case ST_WARPLIST: - flags = Conf.st_trans.warplist; - break; - default: - flags = ICLASS_ATTR_OPAQUE; - break; + switch (image_type) + { + default: + case ST_UNKNWN: + flags = ICLASS_ATTR_OPAQUE; + break; + case ST_BORDER: + flags = Conf.st_trans.border; + break; + case ST_WIDGET: + flags = Conf.st_trans.widget; + break; + case ST_ICONBOX: + flags = Conf.st_trans.iconbox; + break; + case ST_MENU: + flags = Conf.st_trans.menu; + break; + case ST_MENU_ITEM: + flags = Conf.st_trans.menu_item; + break; + case ST_TOOLTIP: + flags = Conf.st_trans.tooltip; + break; + case ST_DIALOG: + flags = Conf.st_trans.dialog; + break; + case ST_HILIGHT: + flags = Conf.st_trans.hilight; + break; + case ST_PAGER: + flags = Conf.st_trans.pager; + break; + case ST_WARPLIST: + flags = Conf.st_trans.warplist; + break; + } } - - /* - * is->transparent flags: - * 0x01: Use desktop background pixmap as base - * 0x02: Use root window as base (use only for transients, if at all) - * 0x04: Don't apply image mask to result - */ + trans = (flags != ICLASS_ATTR_OPAQUE); +#else + trans = 0; #endif apply = !pmm; @@ -464,12 +459,17 @@ pmm->type = 1; pmm->pmap = pmm->mask = 0; - trans = (Conf.theme.transparency || - (is->transparent && is->pixmapfillstyle == FILL_STRETCH && - imlib_image_has_alpha())); - #ifdef ENABLE_TRANSPARENCY - if (flags != ICLASS_ATTR_OPAQUE) + /* + * is->transparent flags: + * 0x01: Use desktop background pixmap as base + * 0x02: Use root window as base (use only for transients, if at all) + * 0x04: Don't apply image mask to result + */ + if (is->transparent && imlib_image_has_alpha()) + trans = (is->transparent & 0x02) ? ICLASS_ATTR_GLASS : ICLASS_ATTR_BG; + + if (trans) { Window cr; Pixmap bg; =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v retrieving revision 1.129 retrieving revision 1.130 diff -u -3 -r1.129 -r1.130 --- setup.c 14 Jun 2004 17:02:32 -0000 1.129 +++ setup.c 18 Jun 2004 22:21:35 -0000 1.130 @@ -438,12 +438,12 @@ Conf.edge_flip_resistance = 15; #ifdef USE_IMLIB2 - Conf.st_trans.menu = ICLASS_ATTR_GLASS; + Conf.st_trans.menu = ICLASS_ATTR_BG; Conf.st_trans.menu_item = ICLASS_ATTR_OPAQUE; Conf.st_trans.tooltip = ICLASS_ATTR_GLASS; Conf.st_trans.widget = ICLASS_ATTR_OPAQUE; - Conf.st_trans.border = ICLASS_ATTR_OPAQUE; - Conf.st_trans.iconbox = ICLASS_ATTR_OPAQUE; + Conf.st_trans.border = ICLASS_ATTR_BG; + Conf.st_trans.iconbox = ICLASS_ATTR_BG; Conf.st_trans.dialog = ICLASS_ATTR_BG; #endif =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/tooltips.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -3 -r1.64 -r1.65 --- tooltips.c 3 Jun 2004 18:04:46 -0000 1.64 +++ tooltips.c 18 Jun 2004 22:21:35 -0000 1.65 @@ -383,8 +383,6 @@ ST_TOOLTIP); IclassApply(tt->s_iclass[3], tt->s_win[3], 32, 32, 0, 0, STATE_NORMAL, 0, ST_TOOLTIP); - if (Conf.theme.transparency && tt->iclass->norm.normal->transparent == 0) - tt->iclass->norm.normal->transparent = 2; IclassApply(tt->iclass, tt->win, w, h, 0, 0, STATE_NORMAL, 0, ST_TOOLTIP); EMapRaised(disp, tt->s_win[0]); EMapRaised(disp, tt->s_win[1]); ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs