Menu problems on Linux with Firefox 3 theme

Discuss application theming and theme development.
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Post by KLB »

The CD option wouldn't work because it couldn't access my hard drive or network. What I really need is a test Linux box, but I don't have a spare machine for this task and duel boots don't work well in my environment.

One thing I really don't understand is why would Firefox for Linux be so different from Firefox for Windows that things like this would even be an issue? A well written webpage that validates to W3C specifications will work correctly on any browser. In the case of Firefox themes, they are essentially a collection of CSS rules, so the rules for how a theme behaves on Linux should be identical to Windows. Firefox should be making OS idiosyncrasies transparent to the theme.
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Post by Frank Lion »

KLB wrote:The CD option wouldn't work because it couldn't access my hard drive or network. What I really need is a test Linux box, but I don't have a spare machine for this task and duel boots don't work well in my environment.

One thing I really don't understand is why would Firefox for Linux be so different from Firefox for Windows that things like this would even be an issue? ...

LiveCDs easily access your existing HDD and the Net. In fact, they're very useful if your OS ever crashes, you go in with a LiveCD and pull all the valuable stuff off the int hdd, onto ext hdd, ftp, dvd, whatever.

Firefox itself is actually fairly different on Linux and, of course, the actual OS itself comes into play...often with menus, as you've found. You get menu problems on Macs, as well.
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Post by KLB »

Actually no it can't access my hard drive (security measures) and it could not access my network drives (again security measures).
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Post by Frank Lion »

KLB wrote:Actually no it can't access my hard drive (security measures) and it could not access my network drives (again security measures).

Well, you're 'stuck up a gum tree without a paddle' then, aren't you? Back to remote coding for you, I reckon. :)
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Post by KLB »

Frank Lion wrote:
KLB wrote:Actually no it can't access my hard drive (security measures) and it could not access my network drives (again security measures).

Well, you're 'stuck up a gum tree without a paddle' then, aren't you? Back to remote coding for you, I reckon. :)

Ya, do you have any solvent? This gum tree is extra sappy.

Seriously though, due to the risks of data falling in the wrong hands if my laptop fell in the wrong hands (e.g. stolen at an airport) my hard drive is nothing more than an expensive paperweight unless accessed properly. Because the important stuff is backed up, I'd rather lose the data because of a system failure than risk having the data fall in the wrong hands.
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
BostonPeng
Posts: 343
Joined: October 31st, 2007, 9:39 am
Location: Malden (Boston), MA
Contact:

Post by BostonPeng »

KLB wrote:I think I may have been running on one wrong assumption. From the beginning, have the individual menu list items (e.g. View -> Page Source) been displaying correctly (white text on blue background)? In other words, have both the menu items (e.g. View) and the menu list items (e.g. View -> Page Source) been having the same problem or has it only been the the menu items themselves?
The menu list items have been fine, it's just the menu items themselves that have been "invisible" because the font color was the same as the background color, which showed us as grey on grey rather than the white on blue the default theme uses. I guess I should have circled the menu item in my screenshots to bring attention to them. It's not such a big deal for people who have used Firefox long enough to know what the menu items are (especially by the menu list item selection) but for people who haven't gotten that familiar with Firefox and use your theme they could get lost pretty quickly.
Proud Ubuntu Intrepid/Mac4Lin user, and Firefox 3 has gotten me to using Epiphany as my default browser so I check these forums a lot less often than I used to.
I used to be known as (Old)HardinComp | My Blog
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Post by KLB »

In a discussion thread for my theme on the Mozilla addons site it was posted that the following would at least fix the text color to black:

Code: Select all

menu[_moz-menuactive="true"],
menuitem[_moz-menuactive="true"] {
color: Black !important;}


It was also confirmed that it was only the primary menu items and not menu list items that is having the display problem. As such I narrowed the focus of my efforts to those styles that effect the main menu items and not menu list items. This lead me to observe the following piece of code:

Code: Select all

menubar > menu[_moz-menuactive="true"],
menubar > menu[_moz-menuactive="true"][open="true"] {
  color: -moz-menubarhovertext;
}


What is interesting about this code is the instruction "-moz-menubarhovertext" this instruction is used only once in the Windows version of classic and is not used at all in the Linux version of classic. Instead, the Linux version of the file uses "MenuText":

Code: Select all

menubar > menu[_moz-menuactive="true"] {
  color: MenuText;
}


Since changing the color of 'menu[_moz-menuactive="true"]' to black in the userChrome.css addresses this issue seems to mitigate the issue, it makes sense to try simply replacing "-moz-menubarhovertext" with "MenuText". I have removed all other modifications I made in an attempt to address this issue and then made this simple change. This change had no ill effects on the windows version of Firefox, which is a good start. As in the past, the new test version of the theme can be downloaded at: http://environmentalchemistry.com/class ... -3.0.2.jar
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
BostonPeng
Posts: 343
Joined: October 31st, 2007, 9:39 am
Location: Malden (Boston), MA
Contact:

Post by BostonPeng »

The black on blue (for the menu items) lets it be seen, but if you could make the text white (as the Linux "Classic" theme uses) it would be a lot easier to read. It's almost there though.
Proud Ubuntu Intrepid/Mac4Lin user, and Firefox 3 has gotten me to using Epiphany as my default browser so I check these forums a lot less often than I used to.
I used to be known as (Old)HardinComp | My Blog
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Post by KLB »

Interesting! On Firefox 3.0b3 for Windows the theme does not change the background color of the menu item. It shows them as raised buttons.

My hunch is that the CSS instruction "background-color: Highlight;" does different things for menu items than it does for menu list items on windows. AND it does different things for the main menu items on Windows than it does on Linux.

I have built another test that tries something a little different. For the main menu items I stopped trying to change the "background-color" and "color" styles for active menu items and instead am putting a "3D" border around them to make them look like buttons. I have uploaded the new test (at the standard location).

Please give it a try and post some screen captures. I am interested in seeing if the border was properly applied. There should be no change in background color and the text color should not change. The menu item should only look like a button when hovered. When clicked on it should change to a "depressed" button.
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
BostonPeng
Posts: 343
Joined: October 31st, 2007, 9:39 am
Location: Malden (Boston), MA
Contact:

Post by BostonPeng »

I can do that after the sun comes up. If there's a link for me to click to get it, that is. ;)
Proud Ubuntu Intrepid/Mac4Lin user, and Firefox 3 has gotten me to using Epiphany as my default browser so I check these forums a lot less often than I used to.
I used to be known as (Old)HardinComp | My Blog
custom.firefox.lady
Posts: 407
Joined: February 28th, 2008, 3:48 am
Location: PA

Post by custom.firefox.lady »

Quote: Instead, the Linux version of the file uses "MenuText"

Aha, I think you've found it.

I've added:
menubar > menu[_moz-menuactive="true"] {
color: MenuText !important;
}

to my userChrome.css file on both WinXP and Linux and removed the previously mentioned ...color:Black... entry. No difference on XP, issue fixed on Linux.

Rather than replacing "-moz-menubarhovertext" with "MenuText", I suggest you try including both css rules. Personally, I prefer the hilight to the button idea, but what you do makes no difference to me, I am happy with my userChrome.css fix, and can just keep using it this way if necessary. My original goal was just to make my Firefox on Linux look more like my firefox on XP and I've achieved that. Thanks for the theme; it was the first one to be b3 compatible that suited my goal.
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Post by KLB »

Ah good, Custom.firefox.lady (hence forth known as CFL) I'm glad you joined us over here. CFL is the one who first made me aware of the menu rendering issue.


The problem with using "color: MenuText" is that it makes the text almost unreadable to some users whose system background color is too close to black. Another option would be to use "color: -moz-menuhovertext" which does turn the menu text white. The problem is that, on Windows, the companion style instructions "background-color: Highlight" or "background-color: -moz-menuhover" do not change the menu item background color. Instead they turn on a "3D" border to make the menu item look like a button. So if I change the text color to white, it becomes almost invisible on a standard Windows configuration.

Basically what we have is a bug in Firefox where two style instructions are mutually dependent upon each other, but do not behave in compatible fashions across platforms. For example:

1) "color: -moz-menubarhovertext;" is used on default Windows version of Classic. Apparently it does nothing on Windows, but makes text invisible on Linux.

2) "color: -moz-menuhovertext;background-color: -moz-menuhover;" is used in default Linux version of Classic. On a typical Linux configuration it turns the background color blue and the menu text white. On Windows, however it only changes the text color and instead of applying a background color it creates a 3D border around the button; this makes the text almost unreadable.

3) "color: -moz-menuhovertext;background-color: Highlight;" - On Linux I suspect it would do the same as #2 and on Windows I know it does the same as #2.

4) Explicitly defining "background-color:blue" does change the highlighted background to blue and eliminates the 3D border on Windows, however, this also overrides the user's system colors, which is not desirable.

The behavior of the CSS instructions "-moz-menuhovertext" and "-moz-menuhover" need to be made consistent (or at least compatible) between the different platforms. This means that on Windows, either "-moz-menuhovertext" needs to do nothing for main menu items OR "-moz-menuhover" needs to turn the background color to the same highlighted color as the menu list items (as it does for Firefox 2.0). Personally, I would prefer that the behavior be identical between Linux and Windows and that the Linux behavior be adopted for Windows. If a 3D button is desired instead, it would be easy enough to apply 3D borders when the button is active and not applying the "color" and background-color" rules (as I have done in my latest test).

It just seems wrong to use the CSS style "background-color" to apply a 3D border for menu buttons as Firefox 3.0b3 for windows is doing right now with "-moz-menuhover".

Unless the behavior of the background color "-moz-menuhover" is made consistent, across platforms we are going to have a mess of themes that are inconsistent across platforms because the theme developer didn't test their theme on other platforms and there are going to be a lot of frustrated users.

What do you think? Is this Bugzilla worthy?
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Post by KLB »

HardinComp wrote:I can do that after the sun comes up. If there's a link for me to click to get it, that is. ;)


Its the same link as always, which is: http://environmentalchemistry.com/class ... -3.0.2.jar
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
BostonPeng
Posts: 343
Joined: October 31st, 2007, 9:39 am
Location: Malden (Boston), MA
Contact:

Post by BostonPeng »

It's a little better, but if you could make the Menu Text (#1 in the screenshot linked to below) white it could be easier to read. Also the box around the Search tool icon (#2) came up in the last test. I'm not sure where it came from, and it's not annoying, but it doesn't come up in the default theme. Otherwise I think it may be ready to rock.

<a href="http://nancib.wordpress.com/files/2008/02/fx3b4prelinux_defaulttheme3.png">http://nancib.wordpress.com/files/2008/02/fx3b4prelinux_defaulttheme3.png</a>
Proud Ubuntu Intrepid/Mac4Lin user, and Firefox 3 has gotten me to using Epiphany as my default browser so I check these forums a lot less often than I used to.
I used to be known as (Old)HardinComp | My Blog
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Post by KLB »

Are you sure you installed the latest version of the theme? I didn't have any background-color instructions for menu items. Your background color should have been left unchanged. Also you should have had a 3D border around your menu buttons when they were hovered over. I have repackaged my theme and uploaded it again. Would you please download it again and reinstall it to ensure you are working off the latest test version. As always you can get the theme at:
http://environmentalchemistry.com/class ... -3.0.2.jar
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
Post Reply