I am using a xulrunner-1.9.2.12.en-US.win32 for an app I am creating. I want the user to be able to change the colours of the app using something similar to the "tools, options, content, colors" menu in firefox.
I am using a prefwindow to set browser.display.background_color using a colour picker. If I look at chrome://global/content/config.xul I see that the value for this property has been correctly changed, however, I see no corresponding change in the web page look and feel. If I view this web page in firefox and make the same changes through tools, options etc, the page changes as expected.
I changed my prefs.js file to the following as a test, with no result: pref("browser.display.foreground_color", "#000000");
pref("browser.display.background_color", "#FF0000");
pref("browser.display.use_document_colors", false);
pref("browser.display.use_system_colors", false);
pref("browser.preferences.instantApply", false);
pref("browser.preferences.animateFadeIn", false);
I will also add my xul file - appologies for the length of the post:
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<prefpane id="colorOptions" label="Colours">
<preferences>
<preference id="browser.display.foreground_color" name="browser.display.foreground_color" type="string"/>
<preference id="browser.display.background_color" name="browser.display.background_color" type="string"/>
</preferences>
<groupbox flex="1">
<caption label="Colour preferences"/>
<label value="Background colour" control="bgColour"/>
<colorpicker type="button" id="bgColour"preference="browser.display.background_color"/>
<label value="Foreground colour" control="fgColour"/>
<colorpicker type="button" id="fgColour" preference="browser.display.foreground_color"/>
<label value="Random colour" control="col"/>
<colorpicker type="button" id="col"/>
</groupbox>
</prefpane>
</prefwindow>
Any ideas? Thanks in advanced, Ant