[Project_owners] Toolbar icons in Firefox

Stephen Clavering mozilla at clav.me.uk
Mon Feb 9 15:40:01 EST 2004


David Murray wrote:

> Ahh, behold the weirdness.
>
> FB 0.6/0.7 handled my toolbar icon fine. Firefox though; although it 
> displays the icon perfectly well on the toolbar, when it is dragged 
> off the toolbar (you know, in the Customize Toolbar thing), it 
> displays its icon as every single icon that's in Firefox. I can't 
> figure out how to get it looking normal (searched through source and 
> all). Anyone have any   ideas? Here's the overlay code:
>
> ---------------------------------------
>  <toolbarpalette id="BrowserToolbarPalette">
>           <toolbarbutton id="deepestsender-button" 
> tooltiptext="Deepest Sender" oncommand="runDS(true);" 
> class="toolbarbutton-1" label="Deepest Sender"/>
>   </toolbarpalette>
> ---------------------------------------
>

Well the problem is that your css file is not being used for 
chrome://toolkit/content/customizeToolbar.xul


I think you need something like this in the contents.rdf for the skin 
package:

  <RDF:Seq about="urn:mozilla:stylesheets">
    <RDF:li resource="chrome://global/content/customizeToolbar.xul"/>
  </RDF:Seq>
  <RDF:Seq about="chrome://global/content/customizeToolbar.xul">
    <RDF:li>chrome://foo/skin/foo.css</RDF:li>
  </RDF:Seq>

but it seems to be fairly random as to whether that actually works or not.


Try just removing the class="toolbarbutton-1", since that is what most 
themes use to set the image to be used for the primary toolbar buttons.  
Without that your toolbar button should just end up with no icon when on 
the customisation panel, which has got to be an improvement.




More information about the Project_owners mailing list