Jim Hunter schrieb: > Great info, thanks. What is the syntax for declaring something like > BOLD or LINE-THROUGH for the font? I used to do it with an additional > line of: this.font.setUnderline(true) or this.font.setItalic(true) > etc. Is it still the same? Where does that line now go? Previously I > would create the font before the Return statement and set the > properties, perhaps that is still the case? Would it look like this: > > qx.Theme.define("custom.Appearance", > { > name : "foo", > > appearances : > { > "SFREGULARTEXT" : { > style : function(states) { > font : new qx.ui.core.Font(12, ["Arial"]); > font.setBold(true); > font.setUnderline(true); > return { > font; > textColor : "black" > } > } > },
It looks slightly different: appearances : { "SFREGULARTEXT" : { style : function(states) { font = new qx.ui.core.Font(12, ["Arial"]); font.setBold(true); font.setUnderline(true); return { font : font, textColor : "black" } } }, Best Fabian > > "SFHIGHLIGHTEDTEXT" : { > style : function(states) { > return { > font : new qx.ui.core.Font(12, ["Arial"]); > textColor : "black" > } > } > }, > > ... > > } > } > > Thanks, > Jim > www.D4PHP.org <http://www.D4PHP.org> > www.D4PHP-Hosting.com <http://www.D4PHP-Hosting.com> > > > > > On 7/30/07, *Fabian Jakobs* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Hi Jim, > > I just migrated to 0.7.2-pre (r9171) and my appearances are > generating > > errors when I try and run the app. I looked in the API viewer to > see > > what the new structure is and it says: > Are you using trunk or the legacy_0_7 branch? I would strongly suggest > to use legacy_0_7. This is where all 0.7 related bugs are fixed. Since > we are now starting to work on the layout managers, the trunk is > expected to be fairly instable for the next time. > > > qx.theme.manager.Appearance.getAppearanceTheme () > > > > is the way to get the instance of the current theme but I get an > error > > 'is not a function" error. So what is the new way to register a > theme? > > I don't see any docs on it and the migration script couldn't help me > > as this is code that is generated from the server (I just created a > > test file and migrated it and got the same resulting line). Here > is a > > sample of what I am generating: > > > > theme = qx.theme.manager.Appearance.getAppearanceTheme(); > > theme.registerAppearance("SFREGULARTEXT",{ setup: function(){ > > this.font = new qx.renderer.font.Font (12,"Arial");}, initial: > > function(){ return { font: this.font, color: "Black"}; }}); > > theme.registerAppearance("SFHIGHLIGHTEDTEXT",{ setup: function(){ > > this.font = new qx.renderer.font.Font(12,"Arial");}, initial: > > function(){ return { font: this.font, color: "Black"}; }}); > > theme.registerAppearance("SFHOTTEXT",{ setup: function(){ > this.font = > > new qx.renderer.font.Font(12,"Arial");}, initial: function(){ > return { > > font: this.font, color: "Black"}; }}); > > The whole way we handle appearances has changed a lot. The function > "registerAppearance" no longer exist. If you want to extend an already > existing theme you can define the apperances in a separate appearance > theme and use the mixin mechanism to apply the > changes/enhancements to > an existing appearance theme. > > Example for your code: > > custom/Appearance.js: > > qx.Theme.define("custom.Appearance", > { > name : "foo", > > appearances : > { > "SFREGULARTEXT" : { > style : function(states) { > return { > font : new qx.ui.core.Font(12, ["Arial"]); > textColor : "black" > } > } > }, > > "SFHIGHLIGHTEDTEXT" : { > style : function(states) { > return { > font : new qx.ui.core.Font(12, ["Arial"]); > textColor : "black" > } > } > }, > > ... > > } > } > > And in your application you include it: > > qx.Theme.include(qx.theme.classic.Appearance, custom.Appearance); > > > And also, 'MS Sans Serif' is no longer a valid font name whereas it > > has been for years. What do I use in place of 'MS Sans Serif'? > The font name should be valid but the second parameter of the font > constructor is now a string array. Take a look at the example above. > Another note: the property color has been renamed to test color to be > more specific and better match to the backgroundColor property. > > I hope this helps, > Best Fabian > > -- > Fabian Jakobs > JavaScript Framework Developer > > 1&1 Internet AG > Brauerstraße 48 > 76135 Karlsruhe > > Amtsgericht Montabaur HRB 6484 > > Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, > Andreas Gauger, Matthias Greve, Robert Hoffmann, Norbert Lang, > Achim Weiss > Aufsichtsratsvorsitzender: Michael Scheeren > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@lists.sourceforge.net > <mailto:qooxdoo-devel@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > <https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel> > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ------------------------------------------------------------------------ > > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > -- Fabian Jakobs JavaScript Framework Developer 1&1 Internet AG Brauerstraße 48 76135 Karlsruhe Amtsgericht Montabaur HRB 6484 Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger, Matthias Greve, Robert Hoffmann, Norbert Lang, Achim Weiss Aufsichtsratsvorsitzender: Michael Scheeren ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel