The file should be 18x18, and the image should be 16x16 (1px of transparent 
around it).

On 2014-05-16 10:20, Dragomir Goranov wrote:
> Thanks, Wesley, that worked great!
> Now my button is a little bigger than the other buttons in the toolbar... How 
> can I see what size exactly should be my button in pixels, so that it is the 
> same as the home-button ?
> 
> 
> 
> On Friday, May 16, 2014 4:08:09 PM UTC+3, Wesley Hardman wrote:
>> I assume you added your gamesjoystick.png to \browser\themes\windows\.  You 
>> will also need to add "skin/classic/browser/gamesjoystick.png" to 
>> \browser\themes\windows\jar.mn for the file to be included in the build.
>>
>>  
>>
>> You can test to see if the file exists and your path is correct by loading 
>> the url chrome://browser/skin/gamesjoystick.png in the browser.  
>> chrome://browser/skin/toolbar.png is an example.
>>
>>
>>
>>
>>
>> On 2014-05-16 05:32, Dragomir Goranov wrote:
>>
>>>
>>
>>> I am trying to add a new button in the toolbar. I managed to accomplish 
>>> this by modifying the file "\browser\base\content\browser.xul". I added 
>>> these lines:
>>
>>>
>>
>>> <toolbarbutton id="games-button" class="toolbarbutton-1 
>>> chromeclass-toolbar-additional"
>>
>>>                        persist="class" removable="true"
>>
>>>                        label="&GamesButton.label;"
>>
>>>                        onclick="BrowserGoGames(event);"
>>
>>>                        cui-areatype="toolbar"
>>
>>>                        tooltiptext="&Games.tooltip;"/>
>>
>>>
>>
>>>
>>
>>> Everything is perfect, except the fact that there is no image for the 
>>> button, so 
>>
>>> I edited this file: "\browser\themes\windows\browser.css"
>>
>>>
>>
>>> #games-button {
>>
>>>   list-style-image: url("chrome://browser/skin/gamesjoystick.png");
>>
>>> }
>>
>>>
>>
>>>
>>
>>>
>>
>>> However, it does not work - I can not see the image on the button. The 
>>> button works, but the image is not shown.
>>
>>>
>>
>>> How can I set the image of my toolbar button ?
>>
>>>
> 

_______________________________________________
dev-builds mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-builds

Reply via email to