Thanks But mixins looks cleaner. isn't it? Any disadvantages using mixin over forcing a class?
On Thu, Aug 6, 2015 at 4:58 PM, Mustafa Sak <mustafa....@1und1.de> wrote: > Hi, > > > > did you try to set a css class on the content element and define a custom > CSS to manipulate it? > > > > The trick is, to set the class via qx.html.Element API [1], after creating > the highr level widget. > > > > Like: > > > > var button = new qx.ui.form.Button(); > > Button.getContentElement().addClass(“myCrazzyCSSClass“); > > > > So you could still let qooxdoo set the layouting styles, like left, top, > padding, margin… And just define your own CSS classes for decoration and > animation and what ever you want to do. > > > > [1] > http://demo.qooxdoo.org/current/apiviewer/#qx.html.Element~addClass!method_public > > Dank & Gruß > * Mustafa Sak* > > Softwareentwickler > Mail Development > > 1&1 Mail & Media Development & Technology GmbH | Brauerstraße 48 | 76135 > Karlsruhe | Germany > Phone: +49 721 91374-6977 > E-Mail: mustafa....@1und1.de | Web: www.1und1.de > > > > *Von:* Phyo Arkar [mailto:phyo.arkarl...@gmail.com] > *Gesendet:* Donnerstag, 6. August 2015 09:41 > *An:* Tobias Oetiker > *Cc:* qooxdoo-devel > *Betreff:* Re: [qooxdoo-devel] shadow radius > > > > coz textshadow and Multiple Css box-shadow Glows aren't supported by > qooxdoo currently. > > > > On Thu, Aug 6, 2015 at 1:34 PM, Tobias Oetiker <t...@oetiker.ch> wrote: > > Hi Phyo, > > > Today Phyo Arkar wrote: > > > I was finding a way to use mixins. > > not quite clear why you insist on NOT using theming support > > > cheers > tobi > > > > > On Wed, Aug 5, 2015 at 7:50 PM, Tobias Oetiker <t...@oetiker.ch> wrote: > > > > > Phyo, > > > > > > Today Phyo Arkar 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 ? > > > > > > Theming is controlled by the theme you specify for your application > > > via the QXTHEME property when running the generator. > > > > > > there is a short introduction here > > > > > > http://manual.qooxdoo.org/5.0/pages/desktop/ui_theming.html > > > > > > cheers > > > tobi > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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 > > > > > > > > > > > > > > > -- > > > 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 > >
------------------------------------------------------------------------------
_______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel