Toolbarbutton label tooltip background color

User Help for Mozilla Thunderbird
Post Reply
Aushilfsarnie
Posts: 2
Joined: August 7th, 2019, 10:25 am

Toolbarbutton label tooltip background color

Post by Aushilfsarnie »

Hello,

how could I change the toolbarbutton label tooltip background color? Thank you!

Best regards
JYLD
Posts: 305
Joined: July 18th, 2019, 9:59 am

Re: Toolbarbutton label tooltip background color

Post by JYLD »

The tooltip color is set in windows not TB, as far as I know. If you are using windows aero/glass color scheme I'm not sure you can change it. If you are using windows classic theme, it can be changed.
morat
Posts: 6405
Joined: February 3rd, 2009, 6:29 pm

Re: Toolbarbutton label tooltip background color

Post by morat »

I can change the background color of the tooltip for the Quick Filter button using an AGENT_SHEET style.

Code: Select all

tooltip[label="Toggle the quick filter bar"] {
  -moz-appearance: none !important;
  color: silver !important;
  background-color: black !important;
}
Aushilfsarnie
Posts: 2
Joined: August 7th, 2019, 10:25 am

Re: Toolbarbutton label tooltip background color

Post by Aushilfsarnie »

Thanks for help! But it doesn`t work! Any other suggestions? THanksin advance!
morat
Posts: 6405
Joined: February 3rd, 2009, 6:29 pm

Re: Toolbarbutton label tooltip background color

Post by morat »

The userChrome.css file supports USER_SHEET styles, but not AGENT_SHEET styles.

You can use the following code to test AGENT_SHEET styles in the console.

i.e. Tools > Developer Tools > Error Console (Ctrl+Shift+J)

Code: Select all

(function () {
    var css = `tooltip {
      -moz-appearance: none !important;
      color: silver !important;
      background-color: black !important;
    }`;
    var ios = Components.classes["@mozilla.org/network/io-service;1"].
      getService(Components.interfaces.nsIIOService);
    var uri = ios.newURI("data:text/css," + encodeURIComponent(css), null, null);
    var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].
      getService(Components.interfaces.nsIStyleSheetService);
    var type = sss.AGENT_SHEET;
 // var type = sss.USER_SHEET;
 // var type = sss.AUTHOR_SHEET;
    if (sss.sheetRegistered(uri, type)) sss.unregisterSheet(uri, type);
    else sss.loadAndRegisterSheet(uri, type);
    ReloadMessage();
})();
If the style doesn't work, then it isn't possible with your setup.

In Thunderbird, the Browser Console is called the Error Console.
Post Reply