Skip to main content

Collaboration between two look-and-feel projects

Posted by kirillcool on August 30, 2005 at 1:43 PM PDT

Werner
Randelshofer
is the developer of very popular Quaqua look and feel. As said on the project main page, Quaqua is focused on fixing minor bugs and glitches in Apple's implementation of the AHIG as well as providing enhancements that make your application fit nicely into Mac OS X. Unfortunately, this excellent look and feel is available for Macintosh only, and until the last release, there wasn't a lot of code which could have been shared with other platforms.

However, the new release 3.3 features an excellent implementation of color chooser dialog UI delegate (see left screenshot below), the first sight of which immediately made me want to have such delegate in my own Substance look and feel (which takes many of its ideas from Mac 10.4 already). Two choices presented themselves immediately: reinvent the wheel or ask to share the code. Undoubtedly, the first choice would be the choice of many open-source developers - a nice-looking wheel waiting to be reinvented. This would mean, of course, an inevitable peek at the source code, and a well-known dilemma, to copy as is or to pretend that you are writing something completely new while you are looking at somebody else's code all along. The second way involves a simple question ("Would you be kind enough to allow sharing some of your code as long as the licenses match and the copyright / credits are in place?"), a short wait, and a sigh of relief when the positive answer comes through.


The sigh of relief stems from many reasons.

  • The code already exists, and fits my needs nicely (otherwise why would I want to use it).
  • Somebody else wrote it and actively maintains it, so any bugs will be fixed (hopefully) by that person :), even double smiley :-)
  • New features / enhancements / versions will be incorporated as is (giving added value to your code without a lot of investment on your part)
  • Last but not the least - this is the essence of open source. Share, share, share. And reuse.

The whole process took about two hours, of which

  • Five minutes were spent on extracting the relevant package for color chooser components, additional helper classes and setting five properties in the UIManager
  • An hour on creating a crayon palette (bottom-right on the right image), as the original palette is most probably copyrighted by Apple
  • An hour on creating listeners for custom sliders of Quaqua color chooser panels for rollover effects (to be consistent with the rest of Substance look and feel.

And finally, the results (Quaqua on Macintosh on the left, Substance on Windows XP on the right):






You can try the Web Start version of Substance look and feel test application (go to Dialogs tab and click Color button). Note that you will need Tiger+ for running this application


Technorati Profile

Related Topics >>