How Do I Change the Address Bar Colors?

User Help for Mozilla Firefox
barbaz
Posts: 1504
Joined: October 1st, 2014, 3:25 pm

Re: How Do I Change the Address Bar Colors?

Post by barbaz »

Oops, forgot to answer this -
koolx wrote:I also want to change the font size for both these elements.
font-size works, but seems to require a slightly different CSS selector. Start with this and see what you can come up with -

Code: Select all

menuitem > label, menu > label, toolbarbutton > label, .menu-iconic-accel, .menu-accel {
  font-size: 9px !important;
}
User avatar
koolx
Posts: 532
Joined: July 11th, 2014, 7:37 pm

Re: How Do I Change the Address Bar Colors?

Post by koolx »

Hi barbaz,

Thanks for the codes. They work. But I got a slight issue. When I right-click over an item in the bookmarks window popup, the highlight blinks repeatedly. Is there a fix to this? Herers the screenshot to show you where exactly I mean. And when I disable the code below the highlight returns to its ugly default color but no blinking. Maybe you can tweak it so theres no blinking?

Code: Select all

  menupopup > [_moz-menuactive]:not([disabled="true"])  {
  -moz-appearance: none !important;
  background-color: blueviolet !important;
  color: #FFF !important;
}
Image
barbaz
Posts: 1504
Joined: October 1st, 2014, 3:25 pm

Re: How Do I Change the Address Bar Colors?

Post by barbaz »

I see the problem, but I don't know why it's happening here. Usually that sort of blinking means the element is changing in size and your mouse pointer is moving in the area between the two sizes.

Anyway, does adding this fix it?

Code: Select all

menupopup > * {
  -moz-appearance: none !important;
}
That may result in losing some desired styling of the menus. If so, you'll need to re-do that styling manually.
User avatar
koolx
Posts: 532
Joined: July 11th, 2014, 7:37 pm

Re: How Do I Change the Address Bar Colors?

Post by koolx »

barbaz wrote:I see the problem, but I don't know why it's happening here. Usually that sort of blinking means the element is changing in size and your mouse pointer is moving in the area between the two sizes.

Anyway, does adding this fix it?

Code: Select all

menupopup > * {
  -moz-appearance: none !important;
}
That may result in losing some desired styling of the menus. If so, you'll need to re-do that styling manually.
Hi barbaz,

Your code works smoothly when hovering over all items. But when I hover over 'cut' and 'delete' the highlight turns to the default blue. Any fix to that?
barbaz
Posts: 1504
Joined: October 1st, 2014, 3:25 pm

Re: How Do I Change the Address Bar Colors?

Post by barbaz »

That's because this code doesn't apply to disabled menu items.

Use this code for those -

Code: Select all

menupopup > [_moz-menuactive][disabled="true"]  {
  -moz-appearance: none !important;
  background-color: #38A !important;
  color: #FFF !important;
}
User avatar
koolx
Posts: 532
Joined: July 11th, 2014, 7:37 pm

Re: How Do I Change the Address Bar Colors?

Post by koolx »

Hi barbaz,

Thank you very much for the correct code.

Now I want to shift gears a bit and show you a weird occurance in TB. I installed an app called Thunderbird Conversations. Theres a pink bar settled at the bottom which shouldnt be there. It occurs when TB is maximized. I used DOMi to find out what the element is. but its elusive. It doesnt occur when unmaximized but I need it maximized. Disabled my theme and extensions and the bar still appears.

Please look at the screen shot. Keep in mind that my o/s has a pink theme so the bar is in pink. So dont let that throw you off. Hope you could help me with rmoving it. Thank you once again barbaz.

Image
barbaz
Posts: 1504
Joined: October 1st, 2014, 3:25 pm

Re: How Do I Change the Address Bar Colors?

Post by barbaz »

What version of Thunderbird are you using?
koolx wrote:I installed an app called Thunderbird Conversations.
This app? - https://github.com/protz/thunderbird-conversations
User avatar
koolx
Posts: 532
Joined: July 11th, 2014, 7:37 pm

Re: How Do I Change the Address Bar Colors?

Post by koolx »

barbaz wrote:What version of Thunderbird are you using?
koolx wrote:I installed an app called Thunderbird Conversations.
This app? - https://github.com/protz/thunderbird-conversations
I got TB version 45.8.0.

Yes thats the app.
barbaz
Posts: 1504
Joined: October 1st, 2014, 3:25 pm

Re: How Do I Change the Address Bar Colors?

Post by barbaz »

I'm not quite able to reproduce that bottom bar, but I have a guess as to what it is. When I maximise Thunderbird, a grey bar briefly appears at the bottom of the window, then disappears. I think that grey bar is the Linux equivalent of the pink bar in your Windows.

If I'm correct, the reason it's eluding DOMi would be because there kind of isn't any element there to inspect.

Since I'm not seeing it in my setup, I'm not sure how to remove it, sorry.
User avatar
koolx
Posts: 532
Joined: July 11th, 2014, 7:37 pm

Re: How Do I Change the Address Bar Colors?

Post by koolx »

barbaz wrote:I'm not quite able to reproduce that bottom bar, but I have a guess as to what it is. When I maximise Thunderbird, a grey bar briefly appears at the bottom of the window, then disappears. I think that grey bar is the Linux equivalent of the pink bar in your Windows.

Since I'm not seeing it in my setup, I'm not sure how to remove it, sorry.
Hi barbaz,

Thank you for that. Since the only way this bar can be removed is by unmaximizing then maximizing TB, is there a code that can do that very quickly everytime TB starts up? Its got to be executed extremely quickly so as not to take up a long time. If so, please let me know.

Back to FF now, the About page is missing the title bar and its close button. Below is a screen shot. Below that is the code I use to customize FF which turns off the title bar. How can I bring back the title bar while keeping my customization?

Image

Code: Select all

@-moz-document regexp("(chrome://browser/content/about.ialog.xul|about:(?!blank|stylish-edit|downloads|devtools-toolbox|looppanel|pocket).*)"){

  .autocomplete-treebody, #browserHomePage > popupset > panel > tree > treechildren, #browserHomePage > popupset > panel > tree > treerows  {
    background: #222 !important;
    color: white !important;
  }
  

  
/*Selector in Add-ons, Stylish, Extensions, Options, etc.*/  
:not(menupopup) {
  background-color: transparent !important;
  }
/*Bkgd image in Add-ons, Stylish, Extensions, Options, etc.*/
  #headered-views, #nav-header, #categories, .main-content {
    background:url("file:///C:/Users/x/Documents/Blue&Red.jpg") fixed #000 !important;
    background-size: cover !important; margin: 0 !important;
  }
/*White text in Add-ons, Stylish, Extensions, Options, etc.*/  
:not(#ׂ) {
  color: white !important;
  text-shadow: none !important;
  }
/*Dark transparent buttons in Add-ons, Stylish, Extensions, Options, etc.*/
button, [type="button"]:not(.newtab-control):not(#newtab-customize-button), toolbarbutton, textbox, [type="text"], menulist,table[role="presentation"], #warning_message, [type="search"], .newtab-cell, .alert,[role="dialog"], #newtab-customize-panel {
  background-color: rgba(0,0,0,.5) !important; 
  border: 0 !important;*/
  }}
barbaz
Posts: 1504
Joined: October 1st, 2014, 3:25 pm

Re: How Do I Change the Address Bar Colors?

Post by barbaz »

koolx wrote:Back to FF now, the About page is missing the title bar and its close button. Below is a screen shot. Below that is the code I use to customize FF which turns off the title bar. How can I bring back the title bar while keeping my customization?
I think that's Windows-specific as I can't repro that on Linux. But looking at your code, I have a guess.

Try removing this text from your @-moz-document line -

Code: Select all

chrome://browser/content/about.ialog.xul|
If that gets the titlebar back, try styling the about dialog separately -

Code: Select all

@-moz-document regexp("chrome://browser/content/about.ialog.xul") {
/*White text in Add-ons, Stylish, Extensions, Options, etc.*/ 
:not(#ׂ) {
  color: white !important;
  text-shadow: none !important;
  }
/*Dark transparent buttons in Add-ons, Stylish, Extensions, Options, etc.*/
button, [type="button"]:not(.newtab-control):not(#newtab-customize-button), toolbarbutton, textbox, [type="text"], menulist,table[role="presentation"], #warning_message, [type="search"], .newtab-cell, .alert,[role="dialog"], #newtab-customize-panel {
  background-color: rgba(0,0,0,.5) !important;
  border: 0 !important;
  }}
barbaz
Posts: 1504
Joined: October 1st, 2014, 3:25 pm

Re: How Do I Change the Address Bar Colors?

Post by barbaz »

koolx wrote:Since the only way this bar can be removed is by unmaximizing then maximizing TB, is there a code that can do that very quickly everytime TB starts up?
This Javascript code seems to work -

Code: Select all

window.restore();window.setTimeout(window.maximize, 100);
In order to be run automatically, I think it would have to go in an addon. I haven't written addons in years, and I never wrote Thunderbird addons, so I'm not sure how to apply it.

If you want to see the code at work, open the Error Console (Ctrl-Shift-J), paste this in, and click "Evaluate" -

Code: Select all

Components.utils.import('resource://gre/modules/Services.jsm');var w=Services.wm.getMostRecentWindow('mail:3pane');w.restore();w.setTimeout(w.maximize, 100);
User avatar
koolx
Posts: 532
Joined: July 11th, 2014, 7:37 pm

Re: How Do I Change the Address Bar Colors?

Post by koolx »

barbaz wrote: I think that's Windows-specific as I can't repro that on Linux. But looking at your code, I have a guess.

Try removing this text from your @-moz-document line -

Code: Select all

chrome://browser/content/about.ialog.xul|
If that gets the titlebar back, try styling the about dialog separately -
Thanks barbaz.. that worked! Thanks
User avatar
koolx
Posts: 532
Joined: July 11th, 2014, 7:37 pm

Re: How Do I Change the Address Bar Colors?

Post by koolx »

barbaz wrote: This Javascript code seems to work -

Code: Select all

window.restore();window.setTimeout(window.maximize, 100);
In order to be run automatically, I think it would have to go in an addon. I haven't written addons in years, and I never wrote Thunderbird addons, so I'm not sure how to apply it.
Hi barbaz,

Appreciate your great work again!

Yes the code works! I ran it in the error console and the app ran with TB maximized without that annoying bar. Maybe I can write an extension for it? Its a daunting task since I've never written one before in my life. But I'll take a stab at it. Maybe there are forums that help people write apps for TB?

I'll find those forums and inquire about this. Or if you know of any that are good let me know please! Thanks barbaz.
barbaz
Posts: 1504
Joined: October 1st, 2014, 3:25 pm

Re: How Do I Change the Address Bar Colors?

Post by barbaz »

You're welcome!

The only forum I know of to ask about writing extensions is http://forums.mozillazine.org/viewforum.php?f=19
Post Reply