Native Mac theme
A frequent comment I get is that the GTK+ OS X screenshots look like... GTK+. As opposed to native Mac applications, of course. I started a native theme engine quite a while ago but got sidetracked with other things, so it's been sitting around in a git repo for some time now. It could be a fun hack if someone wants to get involved in GTK+ OS X hacking, and there is plenty of low hanging fruit to take care of. It's quite rewarding to play around with, as the result of the work is so immediately visible.
You can check it out here:
git://git.imendio.com/richard/quartz-engine.git
Here's an example of what it looks like on 10.5:

Comments
I have a very stupid question, and I think I know the answer to it, but here goes: that can't be run on Linux, can it?
I am assuming that your engine somehow depends on quartz or something, so that probably wouldn't work... but it would be cool.
Posted by: Ioannus de Verani | February 20, 2008 10:32 PM
Impressive work! Nice to see GNOME apps getting beatiful on the mac. This will help introducing new people into the foss world.
Posted by: dré | February 20, 2008 10:35 PM
Pretty awesome! I'm going to have to have a look soon at creating a Hotwire installer for OS X that bundles this stuff.
Posted by: Colin Walters | February 20, 2008 10:46 PM
I always thought that if the native Windows GTK+ theme is WIMP then the native Mac GTK+ theme had to be WUSS, so please call the engine WUSS.
Because only *NIX user aren't wimps and wussys!
Posted by: Imos Anon | February 21, 2008 01:43 AM
@Imos Anon: Mac OS X is a *NIX operating system
Posted by: ka2 | February 21, 2008 04:59 AM
Where is the source?
Posted by: Anders | February 21, 2008 08:34 AM
Ioannus: That's correct, it only works on Macs.
Posted by: Richard Hult | February 21, 2008 10:01 AM
Well yes, Mac OS X is technically a *NIX but so is BeOS/Haiku and I don't think of them as *NIX either. Without the Filesystem Hierarchy Standard, X and regular use of the command line its not really *NIX.
Posted by: Imos Anon | February 21, 2008 12:33 PM
It looks very nice indeed, and much better than what Qt looks like on OS X for example. We would like to use it for Inkscape too.
autogen.sh does not run right now though. I made a patch[1] that got me past configure. It adds a check for automake-1.10 (current version in MacPorts) and uses glibtool instead of the system libtool. Indeed the system libtool does not have libtoolize and does not recognize the --version switch which is used to check its existence.
I still get an error at compile time but this will be solved later. Thanks for making it public. I look forward to seeing contributions to this.
[1] http://jo.irisson.free.fr/dropbox/autogen.patch
Posted by: JiHO | February 21, 2008 01:18 PM
This looks great-- does it also work for those of us who prefer to use the Graphite Aqua appearance rather than the default Blue one, though...?
Posted by: Calum | February 21, 2008 03:51 PM
JiHO: Thanks! I'll apply your patch.
Calum: It just uses the native drawing APIs so the right color is automatically applied for things like focus and scrollbars etc. For some things we might have to do some manual syncing of colors between the system and gtk though.
Unless that was clear by the way, the theme is not ready for general use yet, many things are not implemented so there is plenty of opportunity to help out :)
Posted by: Richard Hult | February 21, 2008 04:31 PM
Just installed on my G4 (Mac OS 10.4)...when trying to use with Emesene i get a few bugs (no scrolling bar, no checks for plugins and no arrows on preferences tabs). Is it an Emesene issue? Or do I need to update gtk+ to last svn?
Current installed is rev.19598.
On my blog you can see a screenshot...
Many thanks for your work!!
Posted by: SpaDaRiO | February 21, 2008 06:35 PM
SpaDaRiO: It is not supposed to be usable yet, it's work in progress. Let me know if you want to help out, I already have received a couple of patches since I posted yesterday, fixing the scrollbar issue amongst other things :).
Posted by: Richard Hult | February 21, 2008 07:12 PM
I just wanted to know if it was a problem on emesene or on your theme...
So...I'm waiting for a patched theme...
Thanks
Posted by: SpaDaRiO | February 21, 2008 08:32 PM
(Edited a bit to make clearer)
JiHO: I applied the automake 1.10 part of your patch, thanks! The rest is not really correct imo. Using "which" breaks on tiger, because it always returns success, and in order to build the rest of the stack you have to have libtoolize without a g (normal upstream gnu libtool installed into your build prefix), so that part should probaby be a ports specific patch... To make things easier we could support using the LIBTOOLIZE env variable though.
Posted by: Richard Hult | February 21, 2008 10:20 PM
but when can we hope for release of fully working gtk for mac?
Posted by: sven | February 22, 2008 12:14 PM
I saw that scrollbar was fixed...now I hope that checks, tabs and many other things will be implemented soon :)
Keep up the good work
Greetings from Sicily, Italy
Posted by: SpaDaRiO | February 22, 2008 11:18 PM
That's very nice!
Posted by: kenjiru | February 23, 2008 12:37 AM
Wow, saw this on Planet Gnome. Looks amazing!
Posted by: Anders Bergh | February 23, 2008 05:18 AM
How do I actually get this theme to load? I have been trying to mess around with my .gtkrc file and can't seem to get it to load.
Posted by: John Swensen | February 23, 2008 08:41 PM
John> Try to rename it to .gtkrc-2.0
Posted by: SpaDaRiO | February 24, 2008 02:23 PM
John> Try to rename it to .gtkrc-2.0
Posted by: SpaDaRiO | February 24, 2008 02:23 PM
John> Try .gtkrc-2.0
Posted by: SpaDaRiO | February 24, 2008 02:24 PM
THANK YOU.
Thank you thank you thank you. This is awesome.
I absolutely love GTK+ and Glade and would like to use them for all my UI development, but getting reasonable looking applications on MacOS has been a big sticking point for a while. How long until this is production-quality? I can't *WAIT* to distribute my first PyGTK application to my Mac-using friends!!!
Posted by: Glyph Lefkowitz | February 25, 2008 11:18 PM
Glyph Lefkowitz: the mac port is already usable for many things, even if the native theme isn't. If you want to try things out and report any issues, things might move along quicker :)
Posted by: Richard | February 26, 2008 09:27 AM
There's something to be said for a visually distinct theme: It's not as if Clearlooks is unattractive.
GTK ain't aqua and It's probably unrealistic for you to change aspects of the port to work *exactly* as native controls do.
If widgets look native but behave "improperly" - that /may/ be problematic.
Honestly, it depends on the program and the magnitude of the differences, I suppose.
For something simple , no one's going to object and many will love a native appearance.
For something more... esoteric, with a lot of "weird" controls, a more consistent look across platforms might be preferable to the confusion of mixed widgets or widgets that act wonky.
Again - it's one of the central design issues of cross-platform GUIs... Just thinking out loud here.
Posted by: Yashka | March 5, 2008 11:40 PM
Jeez...all i want to do is to get a mac theme for my Windows vista. I don't know how though...
Posted by: Arjun | March 14, 2008 01:40 AM
The theme I'm working on is completely tied to Mac OS since it uses Mac APIs to do the drawing.
Posted by: Richard Hult | March 14, 2008 10:30 AM
I just tried the theme with Gimp and it looks great. There are two minor glitches that I have found:
1) If you hover over a button with a tooltip, the button looses focus, as soon as the tooltip appears, which means you cannot click the button unless you move the mouse pointer to make the tooltip disappear and click very fast.
2) Gimp uses Images in select box labels. These images are misplaces when the select box is collapsed, but places correctly when the select box is expanded.
I am using gtk2 2.12.9 from Macports on Leopard.
Posted by: Lars Trieloff | March 28, 2008 09:55 AM
Lars: the tooltip problem is fixed in svn I believe. I'm not sure I understand the second point, could you clarify it a bit or tell me in what dialog etc please?
Posted by: Richard Hult | March 28, 2008 10:14 AM
I tried compiling this on Tiger. make fails saying "/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
_gdk_quartz_drawable_get_context". Is there a mailing list where you guys answer questions, or this blog is the only venue?
Posted by: Ofey | March 29, 2008 05:34 PM
Ofey: Are you perhaps building against an X11 version of GTK+ on Mac? You need the quartz version. You could post in the forum at http://developer.imendio.com/forum/gtk-macosx if you have further questions.
Posted by: Richard Hult | March 30, 2008 10:02 AM
Richard, I just updated from git and got following results:
http://www.youtube.com/watch?v=zk37GweB88M
http://www.youtube.com/watch?v=vtkycqix-e8
Note that I am clicking the button all the time in the first video, but the button has no focus, so it does not work.
Is there an issue tracker for this theme?
Posted by: Lars Trieloff | March 31, 2008 12:12 PM
Lars, the tooltip/focus issue is not related to the theme, you need to get a newer version of GTK+ for that fix.
There is no tracker for the theme, but you can send me email or post to the forum at http://developer.imendio.com/forum/gtk-macosx if you want.
Posted by: Richard Hult | March 31, 2008 12:18 PM
Richard, thank you for the help. I am using the latest stable release of GTK+, I will try using an unstable build when I find some time. Will there be updates to the stable branch of GTK+ or are all future improvements tied to the development branch.
Posted by: Lars Trieloff | March 31, 2008 01:03 PM
That fix has been committed to the stable branch as well, so if there ever is a 2.12.10 release, it will have the fix.
Posted by: Richard Hult | March 31, 2008 01:15 PM