Hi,
I'm trying to change the default background colour in my application.
I understand the background colour is set in qx.theme.appearance.Classic,
under the client-document key, and changing it here works OK, but what I
want to do is create a custom theme that inherits from the Classic theme, as
described in the documentation
(http://qooxdoo.org/documentation/user_manual/create_a_custom_appearance).
So I've created my custom theme class and set it as the appearance theme in
my application initialisation. However, overriding the client-document key
and setting a new background colour doesn't seem to have any effect. I've
resorted to setting the background colour manually in the main method:
var d = qx.ui.core.ClientDocument.getInstance();
d.setBackgroundColor(null);
The code for my custom theme is below. Any help would be much appreciated.
(If anyone's interested, I'm trying to build an Ajax powered IDE.)
qx.OO.defineClass("ajax_ide.theme.appearance.customTheme",
qx.theme.appearance.Classic,
function(vTitle) {
qx.theme.appearance.Classic.call(this, vTitle || "Custom Appearance");
});
// Define appearances
qx.Proto._appearances = qx.lang.Object.carefullyMergeWith( {
/*
* My custom appearance settings here
*/
"client-document" : { // This doesn't seem to be working for some
reason...
setup : function() {
this.bgcolor = new qx.renderer.color.ColorObject("#FFFFFF");
this.color = new qx.renderer.color.ColorObject("windowtext");
},
initial : function(vTheme) {
return {
backgroundColor : this.bgcolor,
color : this.color,
hideFocus : true,
enableElementFocus : false
}
}
},
}, qx.Super.prototype._appearances);
// Singleton instance getter
qx.Clazz.getInstance = qx.lang.Function.returnInstance;
// Register the appearance theme to the appearance manager
qx.manager.object.AppearanceManager.getInstance().registerAppearanceTheme(qx
.Clazz);
Tom
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel