MozillaZine

Toolbarbutton label tooltip background color

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

Post Posted August 7th, 2019, 10:28 am

Hello,

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

Best regards

JYLD
 
Posts: 63
Joined: July 18th, 2019, 9:59 am

Post Posted August 7th, 2019, 3:11 pm

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: 3312
Joined: February 3rd, 2009, 6:29 pm

Post Posted August 11th, 2019, 6:27 am

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

Post Posted August 18th, 2019, 7:42 am

Thanks for help! But it doesn`t work! Any other suggestions? THanksin advance!

morat
 
Posts: 3312
Joined: February 3rd, 2009, 6:29 pm

Post Posted August 19th, 2019, 8:18 am

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.

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 8 guests