Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightweight themes not applied when Findbar (NoScript etc?) opened #9

Open
nmaier opened this issue Dec 19, 2010 · 13 comments
Open

Lightweight themes not applied when Findbar (NoScript etc?) opened #9

nmaier opened this issue Dec 19, 2010 · 13 comments

Comments

@nmaier
Copy link
Contributor

nmaier commented Dec 19, 2010

Steps:

  1. Install a lightweight theme, aka. Persona
  2. Observe the addon-bar, with our without Barlesque is styles according to the lightweight theme (footer image) as it is part of bottomBox.
  3. Configure Barlesque to stack the addon-bar above the FindBar (or any other bar I guess); IIRC findmode=2
  4. Open the FindBar
  5. The Barlesque addon-bar loses the lightweight theme style

The behaviour is due Barleque:

  1. The styles Barlesque adds in this case (the background gets grey)
  2. The fixed position above the addon-bar moves it outside of the area that the bottom-box and hence outside of the area that is covered by the lightweight theme background-image.

I'm not quite sure how to remedy this. Brainstorming, I come up with these ideas:

  • Listen for lightweight theme styling changes and apply the background image yourself.
  • Never apply lightweight theme images
  • Move the addon-bar element above the FindBar and drop the position fixed.
@Drugoy
Copy link

Drugoy commented Dec 22, 2010

Yeah, there will definitely be some problems with personas, since they may change toolbars' heights.
But fixing the gray background might be possible, I just suggested a style with the hardcoded color as I don't use any themes and forgot to think about possible compatibility problems with them.
The problem is that if we detach add-on bar it's background becomes completely transparent.
We can try to remove "!important" from that rule and hope that persona's style has "important" so it will have more priority.
Or try to remove the hardcoded colors and try to reach the effect of non-transparent background by using -moz-appearance.

@AllSeeingEye
Copy link
Owner

But fixing the gray background might be possible

background-color: transparent !important; background-image: none;

  • this css rule makes add-on bar that is overlaid over the find bar "compatible" with personas. For other use cases, we'll need to play with "inherit", I think.

Targetting this for v1.16.

@AllSeeingEye
Copy link
Owner

Listen for lightweight theme styling changes and apply the background image yourself.

I've tested some personas, and most seem to apply some background to #bottom-box element - probably we should just copy it.

@nmaier
Copy link
Contributor Author

nmaier commented Dec 22, 2010

I've tested some personas, and most seem to apply some background to #bottom-box element - probably we should just copy it.

Indeed, but don't forget about the foreground color. ;)
Best would be to observe the "lightweight-theme-styling-update" notification. See/steal from:
http://mxr.mozilla.org/mozilla-central/source/toolkit/content/LightweightThemeConsumer.jsm

@Drugoy
Copy link

Drugoy commented Dec 22, 2010

Oh, I forgot about an easy and proper fix.
All we need is just to add :not(-moz-lwtheme) to the elements we apply background changes.

@Drugoy
Copy link

Drugoy commented Dec 23, 2010

Try this version and tell me if the issue has gone for you: http://dl.dropbox.com/u/11652751/barlesque-1.15-fx.xpi

@Drugoy
Copy link

Drugoy commented Dec 23, 2010

Oh, this makes a transparent background for the addon-bar if no theme/persona is installed, so I'll investigate this problem a little bit more, but tomorrow.

For some reason the rule .barlesque-bar:not(:-moz-lwtheme)
{ background-color: -moz-dialog !important;}
appears to be invalid.

@AllSeeingEye
Copy link
Owner

For some reason the rule .barlesque-bar:not(:-moz-lwtheme)
{ background-color: -moz-dialog !important;} appears to be invalid.

Yes - that's because background-color is applied to #addon-bar, not to .barlesque-bar (which is always a #bottom-box).

@Drugoy
Copy link

Drugoy commented Dec 23, 2010

no, it's because in 1 of the lines I had a typo and forgot to add just 1 symbol. Now it's fixed.
same link http://dl.dropbox.com/u/11652751/barlesque-1.15-fx.xpi

@Drugoy
Copy link

Drugoy commented Jan 3, 2011

http://dl.dropbox.com/u/11652751/barlesque-1.15b-fx.xpi this is a version that works properly with skins.

@ghost
Copy link

ghost commented Jun 3, 2011

@Drugoy or AllSeeingEye: Is the above version which "works properly with skins" still available? The link in the previous comment is broken. Could you post a more permanent link to the file? Much appreciated. Thank You All!

@Drugoy
Copy link

Drugoy commented Jun 3, 2011

Sorry, seems like I've removed this file and I don't have any copies of it.
I don't use barlesque anymore, since the author stopped developing it.
You may try this add-on instead: https://addons.mozilla.org/en-US/firefox/addon/minimize-addon-bar/

@ghost
Copy link

ghost commented Jun 3, 2011

Greetings Drugoy,

I was afraid of this...Thank You for the immediate response.
I just tried out your suggested alternative. While it does allow me to alter the color of the Add-on Bar (including reducing alpha transparency to a minimum value of 10!), it completely changes the position and style of the Find Bar without even an option to decline these changes. This is much less desirable than using Barlesque, which, with "overlaid" mode turned on, essentially provides the look of a combined Find Bar and Add-on Bar. Even if Minimize Addon-Bar was updated with an option to decline changes to the Find Bar and overlay it instead, there is another issue: unlike Barlesque, Minimize Addon-Bar displays two of the icons I have chosen for the Add-on Bar lower than the rest, resulting in an undesirable visual effect.

Perhaps if you're not too busy, you could post some instruction on what one would need to do to achieve the same fix for Barlesque as you made earlier, where Personas properly display through the Add-on Bar. I'm sure it would be useful reference material for anyone experiencing a similar situation. Judging by the previous posts on this page, it seems like a simple matter of adding a few lines of code to a particular file, but I'm unsure what to insert into which file. Thank You :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants