[FX] Pu7o: 02-18 (1.8.0.x/OSX Unibin) - Native Aqua Widgets!

Discussion of third-party/unofficial Firefox/Thunderbird/SeaMonkey builds.
phiw13
Posts: 2777
Joined: November 7th, 2002, 1:00 am
Location: Japan
Contact:

Post by phiw13 »

I finally got some time to play around with these builds.

There are still some problems with those Cocoa widgets, especially visible when one zooms in a page. There is a white border around the first option in a [select] drop-down menu. Test form.

I noticed in the forms.css that is shipped with those builds that you've some of the code I use for my own 'Pretty Widgets' to improve the rendering of those select menus. For whatever reason, that seems indeed to help a bit. Don't ask me why...
Here is a cleaned-up version, reduced to the bare minimum: forms-cocoaWidgets.txt.

That white border around the options I mention above, I can't get rid of it :-(. It is caused by the same code that gives that black border around those thingies when you click on them.
drumsticks
Posts: 607
Joined: April 14th, 2005, 4:32 am
Location: Australia

Post by drumsticks »

phiw13, your bare minimum version doesn't appear to be working for me, unfortunately. Everything else the same, just swap the forms.css files...
phiw13
Posts: 2777
Joined: November 7th, 2002, 1:00 am
Location: Japan
Contact:

Post by phiw13 »

Just add to the forms.css.
I took the build linked upthread, and the forms.css has this comment in it:

Code: Select all

/* Taken from PW's aquaish widgets to fix the selects */

Delete from there till the end and replace with the code I made.
drumsticks
Posts: 607
Joined: April 14th, 2005, 4:32 am
Location: Australia

Post by drumsticks »

phiw13 wrote:Delete from there till the end and replace with the code I made.


Ah yes, that makes sense and it is working fine now. Do let us know if you can fix the white/black border problem. Thanks for your efforts.
Pu7o
Posts: 72
Joined: April 16th, 2005, 8:00 am

Post by Pu7o »

How about this for an improvement?

Image

Done by adding -moz-appearance: menupopup !important; in:

Code: Select all

*|*::-moz-dropdown-list {
   -moz-appearance: menupopup !important;
   border: none !important;
   border-color:transparent !important;
   background-color: #fff !important;
   outline:none;
}


The menupopup line was not there originally, add it to get this effect :)
phiw13
Posts: 2777
Joined: November 7th, 2002, 1:00 am
Location: Japan
Contact:

Post by phiw13 »

Pu7o wrote:How about this for an improvement?
[......]

The menupopup line was not there originally, add it to get this effect :)


Nice :-).

I ran a diff with the forms.css that ships with Camino (1.0b2 and trunk builds) and found some small differences.
I've also tried to get rid of that white/black border around the select widgets. No luck so far, but I've hacked a little more to minimize the negative effects.

An edited forms.css.
note: it is a complete form.css this time. Just save as and replace.

Changes:
* better handling of that stupid border.
* matching the forms.css from Camino.
* the submit buttons look now a bit larger and match those from Camino. If you don't like it, the original code is still in the file, look for comments like this: /* phiw13 - PW */

Tested this with the Firefox 1.5 build, and the Fox looks much better...
Have fun.
Pu7o
Posts: 72
Joined: April 16th, 2005, 8:00 am

Post by Pu7o »

To note that my original build only had the border when the widget was selected, the background hid the white border.
cliffzilla
Posts: 209
Joined: May 15th, 2003, 9:35 pm

Post by cliffzilla »

The download link in the initial post doesn't work, is there a new one? Thanks,
Pu7o
Posts: 72
Joined: April 16th, 2005, 8:00 am

Post by Pu7o »

Try the link again, it should be fixed. Don't know why it suddenly went to lowercase.
Lost User 117706
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Lost User 117706 »

i used this last night and it was fine, today it seems very slow and processor intensive. either i didin't notice it last night, or something has happened, has anyone found this version slow and porcessor intensive or is it me ?

tia
Pu7o
Posts: 72
Joined: April 16th, 2005, 8:00 am

Post by Pu7o »

Well, nearly a month after this thread died, I found out how to fix the select problem! (requires changes to the Firefox source code):

Go to mozilla/layout/forms/nsComboboxControlFrame.cpp

Search for the following comment:

Code: Select all

    // nsITheme should take care of drawing the focus border, but currently does so only on Mac.
    // If all of the nsITheme implementations are fixed to draw the focus border correctly,
    // this #ifdef should be replaced with a -moz-appearance / ThemeSupportsWidget() check.

And put an #if 0 before the following line:

Code: Select all

    if (!ToolkitHasNativePopup() && mDisplayFrame) {


And an #endif after this:

Code: Select all

      aRenderingContext.PopState();
    }


The result? Image

Download link: Firefox Aqua Widgets (Universal Binary)

Enjoy! :)
drumsticks
Posts: 607
Joined: April 14th, 2005, 4:32 am
Location: Australia

Post by drumsticks »

Just summarising, we need to make changes to nsNativeThemeMac.cpp AND nsComboboxControlFrame.cpp AND include the forms.css file, right?
Pu7o
Posts: 72
Joined: April 16th, 2005, 8:00 am

Post by Pu7o »

Yes. You should use the forms.css from the build that I released today to get "perfect" aqua widgets.
drumsticks
Posts: 607
Joined: April 14th, 2005, 4:32 am
Location: Australia

Post by drumsticks »

Thanks, Pu7o. Keep up the good work. A few points

- Your UB version is HUGE! Why don't you package it in a dmg?
- Is this branch only? The nsComboboxControlFrame.cpp is different from your description on the trunk. It's as described on the branch though.
- It looks like the default forms.css is not bad for a first approximation. I don't know much about CSS, but I've started to make a few tweaks to my own version of forms.css and quite like the result. Can you post just your forms.css file?
User avatar
krmathis
Posts: 4699
Joined: May 24th, 2004, 9:40 pm
Location: Oslo, Norway
Contact:

Post by krmathis »

You're aware that the JEP plugin in your build are Intel only?
Meaning that PPC users will not have access to Java 1.4 or 1.5, just the old 1.3.1 version.

Great work with the widgets though. They certainly look a lot better than the default ones. :)
Post Reply