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

Discussion of third-party/unofficial Firefox/Thunderbird/SeaMonkey builds.
Pu7o
Posts: 72
Joined: April 16th, 2005, 8:00 am

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

Post by Pu7o »

On OS X, one of the gripes of Firefox is that it doesn't use native aqua widgets on HTML forms, like Safari and Camino do. Instead, it has ugly Windows 9x-like widgets which look really, really bad and out of place.

So, by using some Camino code, I managed to get Firefox to use aqua widgets! (This is not using Firefoxy, that's a way to make widgets look "Aquaish", these are real native aqua controls)

A screenshot is here, and this build of Firefox is available for download here. Enjoy :)

To do this on your own builds do the following:

Before compiling, go to "mozilla/gfx/src/mac" in the source folder, and change the file nsNativeThemeMac.cpp

Change the following:

Code: Select all

#ifndef MOZ_WIDGET_COCOA
  // Only support HTML widgets for Cocoa
  if (aFrame && aFrame->GetContent()->IsContentOfType(nsIContent::eHTML))
    return PR_FALSE;
#endif


to the following:

Code: Select all

#if 0
 // Only support HTML widgets for Cocoa
  if (aFrame && aFrame->GetContent()->IsContentOfType(nsIContent::eHTML))
    return PR_FALSE;
#endif


Then, after compiling, get a copy of camino, and copy the folder Contents/MacOS/res/ from Camino to the equivalent in Firefox.app (or DeerPark.app).

EDIT: Changed link to the newer version. Also, remember to see the 4th post in this thread for updated instructions on reproducing this on your own builds, to avoid gray dropdown boxes, and the 2nd page to find out how to fix the selects.
Last edited by Pu7o on February 18th, 2006, 7:36 am, edited 4 times in total.
drumsticks
Posts: 607
Joined: April 14th, 2005, 4:32 am
Location: Australia

Post by drumsticks »

Interesting... Some dropdown boxes don't appear to be behaving properly though. The list is a very dark shade of grey and the drop down box also appear too large (for some items, not all). I'll continue using this for a while to test it out, but I must say, I've grown to like the non-native widgets (Firefoxy, as you call it). Thanks for the effort!
Pu7o
Posts: 72
Joined: April 16th, 2005, 8:00 am

Post by Pu7o »

Can you show me an example of a dropdown box that's not behaving properly, so I can try to fix it? :)
Pu7o
Posts: 72
Joined: April 16th, 2005, 8:00 am

Post by Pu7o »

OK, I fixed the dropdown box problem, a new build is now available here. A screenshot of the "fix" is also available here. To reproduce this on your own builds, follow my earlier instructions, but by using the res folder from this build instead of from Camino.
User avatar
krmathis
Posts: 4699
Joined: May 24th, 2004, 9:40 pm
Location: Oslo, Norway
Contact:

Post by krmathis »

Short question: You can build Firefox with Cocoa widgets using this in your .mozconfig:

Code: Select all

ac_add_options --enable-default-toolkit=cocoa
Do both of these methods create a simular Firefox.app (or Deer Park.app)?

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

Post by drumsticks »

Pu7o: Sorry I didn't get back to you earlier. Glad you worked out a fix. I'll give it a go again...
nrthomas
Posts: 1988
Joined: February 9th, 2003, 3:25 pm

Post by nrthomas »

That default toolkit command definitely <a href="http://lxr.mozilla.org/mozilla1.8/source/configure#11842">takes care of setting the MOZ_WIDGET_COCOA variable</a>. It would be interesting to do a diff between Camino's res/ and the one you get from Firefox with the Cocoa toolkit command.

EDIT: fixed line number in link to source
Last edited by nrthomas on January 6th, 2006, 10:17 am, edited 1 time in total.
drumsticks
Posts: 607
Joined: April 14th, 2005, 4:32 am
Location: Australia

Post by drumsticks »

This new build is looking pretty good! I didn't think that Cocoa widgets were this far along in development yet. I built a G5 optimized version using your instructions and it is working well. Building now with the default toolkit command to see if there are any differences. Will update later...
Pu7o
Posts: 72
Joined: April 16th, 2005, 8:00 am

Post by Pu7o »

Building with default-toolkit=cocoa yeilds a build with cocoa widgets, yes, but a very unstable and crashy one. On the other hand, doing with my instructions it yeilds a stable one, because it still uses Carbon for everything. Firefox isn't ready for Cocoa yet.
drumsticks
Posts: 607
Joined: April 14th, 2005, 4:32 am
Location: Australia

Post by drumsticks »

I can confirm that building with default-toolkit=cocoa results in a build without a menu bar, regardless of using the default res folder or the modified res folder. Using Pu7o's instructions though, result in a working build! Will continue to do more testing... Keep up the good work!
neilio
Posts: 235
Joined: November 16th, 2002, 8:42 am

Post by neilio »

So awesome. I wonder why alignment is a bit screwy for some select / button combos, but not all? Besides this, though, this is great stuff.
Slumming at the beatnikPad : http://www.beatnikpad.com/
neilio
Posts: 235
Joined: November 16th, 2002, 8:42 am

Post by neilio »

Hm. I just pulled down the latest nightly code as I wanted to build a G4-optimized version with these new form widgets, but I don't see the file nsNativeThemeMac.cpp at all in gfx/src/mac. Am I missing something?
Slumming at the beatnikPad : http://www.beatnikpad.com/
drumsticks
Posts: 607
Joined: April 14th, 2005, 4:32 am
Location: Australia

Post by drumsticks »

theNonsuch: According to http://lxr.mozilla.org/mozilla/source/gfx/src/mac/ it looks like it is no longer there in the trunk. This is branch specific only...
User avatar
brutal
Posts: 241
Joined: September 10th, 2003, 10:04 am
Location: Norway

Post by brutal »

Great work! Thanks man.
Pu7o
Posts: 72
Joined: April 16th, 2005, 8:00 am

Post by Pu7o »

in the Trunk it's in widget/src/mac instead of gfx/src/mac :)
Post Reply