Change icon on tab

Discussion of general topics about Mozilla Thunderbird
Post Reply
raginggoblin
Posts: 2
Joined: December 6th, 2018, 1:22 pm

Change icon on tab

Post by raginggoblin »

I would like to change the icon on the first tab of thunderbird. So when I select an inbox, it should display inbox.svg. I have tried to put the following in my userChrome.css:

.tabmail-tabs>.tabmail-tab[type="folder"][SpecialFolder="Inbox"][selected="true"] {
list-style-image: url("icons/inbox.svg") !important;
}

The tab now displays no icon on selecting in inbox. I reckon Thunderbird is not able to find the url to the icon. However, the css to change the icon in the folder tree works perfectly:
treechildren::-moz-tree-image(folderNameCol, specialFolder-Inbox) { list-style-image: url("icons/inbox.svg") !important; }

Can someone point me to a working css?

I have tried to understand the documentation about chrome urls, but I did not understand what they are trying to explain. It is mostly pointed towards firefox and not specific enough for me to understand it.
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: Change icon on tab

Post by morat »

The following entry works for me with a png image.

Code: Select all

/* Thunderbird userChrome.css */

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

.tabmail-tabs > .tabmail-tab[type="folder"][SpecialFolder="Inbox"][selected="true"] {
  list-style-image: url("icons/inbox.png") !important;
  -moz-image-region: rect(0px 16px 16px 0px) !important;
}
http://kb.mozillazine.org/UserChrome.css

Example image
http://forum.mozilla-russia.org/uploade ... button.png
Last edited by morat on December 7th, 2018, 2:55 pm, edited 1 time in total.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Change icon on tab

Post by tanstaafl »

It doesn't do anything for your problem, but if you want to tweak the tabs further you can use the CustomizeMyBird add-on to change the tabs height, border roundness, and general style rather than figuring out the CSS.
raginggoblin
Posts: 2
Joined: December 6th, 2018, 1:22 pm

Re: Change icon on tab

Post by raginggoblin »

Thanks Morat, that works perfeclty
Post Reply