I also started a SO Question : http://stackoverflow.com/questions/31832625/how-to-use-mixin-in-decorators-for-qooxdoo
On Wed, Aug 5, 2015 at 7:15 PM, Phyo Arkar <phyo.arkarl...@gmail.com> wrote: > I prefer to use it inside Decoration.js , but it is not working. > I try to include the mixin inside Decoration.js but it throws error as > not compatible. > Can you help me a bit on that with code example? > What i thought is , after patching it should just work inside Decorator.js > , without needing to include ? > > > > > > On Wed, Aug 5, 2015 at 7:07 PM, Tobias Oetiker <t...@oetiker.ch> wrote: > >> You can either use the Theme namespace in your app, as suggested >> by the skelleton app, OR you can apply the decorator property >> directly to the widget or the widget compnents ... >> >> cheers >> tobi >> >> Today Phyo Arkar wrote: >> >> > qx.Class.patch(qx.ui.decoration.Decorator, my.MTextShadow); >> > >> > I tried patching but it dosen't work either. >> > >> > On Wed, Aug 5, 2015 at 6:16 PM, Phyo Arkar <phyo.arkarl...@gmail.com> >> wrote: >> > >> > > I can't understand why qooxdoo make styling so difficult. >> > > >> > > On Wed, Aug 5, 2015 at 5:45 PM, Phyo Arkar <phyo.arkarl...@gmail.com> >> > > wrote: >> > > >> > >> When I tried to include it in as mixin i get this erro >> > >> >> > >> Uncaught Error: The mixins 'phwabe.theme.Decoration' are not >> compatible >> > >> 'phwabe.theme.MTextShadow'! >> > >> >> > >> code >> > >> >> > >> qx.Mixin.define("phwabe.theme.MTextShadow", { >> > >> properties : { >> > >> textShadowColor : { >> > >> nullable : true, >> > >> check : "Color" >> > >> } >> > >> }, >> > >> >> > >> members : { >> > >> _styleTextShadow : function(styles) { >> > >> var color = this.getTextShadowColor(); >> > >> if (color === null) { >> > >> return; >> > >> } >> > >> color = qx.theme.manager.Color.getInstance().resolve(color); >> > >> styles["text-shadow"] = color + " 1px 1px"; >> > >> } >> > >> } >> > >> }); >> > >> >> > >> and in decoratoion: >> > >> >> > >> qx.Theme.define("phwabe.theme.Decoration", { >> > >> extend: qx.theme.indigo.Decoration, >> > >> include: [ >> > >> phwabe.theme.MTextShadow, >> > >> phwabe.theme.MBoxShadowSimple >> > >> ], >> > >> >> > >> >> > >> >> > >> On Wed, Aug 5, 2015 at 4:16 PM, Phyo Arkar <phyo.arkarl...@gmail.com >> > >> > >> wrote: >> > >> >> > >>> SO have to do like this? >> > >>> >> > >>> qx.Mixin.define("my.MTextShadow", { >> > >>> properties : { >> > >>> textShadowColor : { >> > >>> nullable : true, >> > >>> check : "Color" >> > >>> } >> > >>> }, >> > >>> >> > >>> members : { >> > >>> _styleTextShadow : function(styles) { >> > >>> var color = this.getTextShadowColor(); >> > >>> if (color === null) { >> > >>> return; >> > >>> } >> > >>> color = qx.theme.manager.Color.getInstance().resolve(color); >> > >>> styles["text-shadow"] = color + " 1px 1px"; >> > >>> } >> > >>> } >> > >>> }); >> > >>> >> > >>> // patch the original decorator class >> > >>> qx.Class.patch(qx.ui.decoration.Decorator, my.MTextShadow); >> > >>> >> > >>> >> > >>> >> > >>> On Wed, Aug 5, 2015 at 4:12 PM, Phyo Arkar < >> phyo.arkarl...@gmail.com> >> > >>> wrote: >> > >>> >> > >>>> So have to write mixin to do that? >> > >>>> >> > >>>> On Wed, Aug 5, 2015 at 12:17 PM, Tobias Oetiker <t...@oetiker.ch> >> > >>>> wrote: >> > >>>> >> > >>>>> Hi Phyo, >> > >>>>> >> > >>>>> >> http://manual.qooxdoo.org/current/pages/desktop/ui_decorators.html >> > >>>>> >> > >>>>> has some insight into this ... >> > >>>>> >> > >>>>> cheers >> > >>>>> tobi >> > >>>>> >> > >>>>> >> > >>>>> Today Phyo Arkar wrote: >> > >>>>> >> > >>>>> > Hello qooxdoo, >> > >>>>> > >> > >>>>> > I belive this mailing list still working. >> > >>>>> > >> > >>>>> > Here is the question , in CSS we can set multiple shadow blurs >> > >>>>> > But i can't find a way to do that in qooxdoo Decorators >> > >>>>> > >> > >>>>> > How can i do like this in qooxdoo? >> > >>>>> > box-shadow: 10px 10px #888, -10px -10px #f4f4f4, 0px 0px 5px 5px >> > >>>>> #cc6600; >> > >>>>> > >> > >>>>> > Or is there anyway to directly use CSS in qoooxdoo, in a clean >> way? >> > >>>>> > >> > >>>>> >> > >>>>> -- >> > >>>>> Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, >> Switzerland >> > >>>>> www.oetiker.ch t...@oetiker.ch +41 62 775 9902 >> > >>>>> >> > >>>>> >> > >>>> >> > >>> >> > >> >> > > >> > >> >> -- >> Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland >> www.oetiker.ch t...@oetiker.ch +41 62 775 9902 >> > >
------------------------------------------------------------------------------
_______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel