0

I want a icon in the Browsertoolbar - that works. See image one

http://s18.postimage.org/njeyj7ekn/Neues_Bild.png

But why I can't see the icon in the icon selection box?

http://s18.postimage.org/pzgrx1wnb/Neues_Bild_1.png

I get only the toolbar icons.

Here are my code snippets:

XUL:

<toolbarpalette id="BrowserToolbarPalette">
      <toolbarbutton id="megxbar-ide-button" label="&MegxBarSidebar.label;" class="toolbarbutton-1 chromeclass-toolbar-additional" tooltiptext="&MegxBarSidebar.label;" observes="viewSidebar_MegxBar" />
   </toolbarpalette>

CSS:

@namespace url('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul');

#megxbar-ide-button {
  list-style-image: url(chrome://MegxBar/skin/megxbar24.png);

}

toolbar[iconsize="small"] #megxbar-ide-button {

    list-style-image: url(chrome://MegxBar/skin/megxbar16.png);

   }

And I have one more question. How could I set the icon per default on that positon of picture number 1? I mean, I start the browser an see the icon of the extension after the first restart after the installation.

4

1 回答 1

0

您的样式文件似乎仅适用于浏览器窗口,不适用于自定义窗口。因此该图标以默认样式显示。

您可以简单地在文件中添加样式覆盖chrome.manifest

style chrome://global/content/customizeToolbar.xul chrome://MegxBar/skin/ff-overlay.css
于 2012-07-30T13:24:58.133 回答