Using Java 6 on Windows XP.
This is how my application looks like with Metal LAF:
http://www7.speedyshare.com/data/736491784/15346488/76200558/protoreto-metal.png
This is a screenshot of the application with Napkin LAF, version 1.0:
http://www7.speedyshare.com/data/881390885/15346533/29377969/protoreto-napkin-1.0.png
It is mostly correct. There text box (it's a JTextArea inside a JScrollPane) is not high enough, but besides that it's fine.
Now take a look at the screenshot with the current SVN version of Napkin LAF:
http://www7.speedyshare.com/data/122853313/15346568/79337504/protoreto-napkin-svn.png
All the components that are disabled are painted incorrectly. They are somehow overdrawn with the graphics of other components.
Maybe this is because someone tried to work on this:
http://wiki.java.net/bin/view/Projects/NapkinDotNextPlan
Algorithmic erasing for disabled components
* do alpha brushing similar to the progress bar scribble fills, but will thicker stroke and at a different (random?) angle.
I tracked this bug down a bit. In NapkinUtil, if you disable this line:
jc.setBackground(new AlphaColorUIResource(
jc.getForeground().getRGB() & 0x00FFFFFF));
Everything works fine. The line was added in revision 455:
http://napkinlaf.svn.sourceforge.net/viewvc/napkinlaf/trunk/napkinlaf/src/main/java/net/sourceforge/napkinlaf/util/NapkinUtil.java?r1=454&r2=455
I cannot explain why the error occurs, but I suggest commenting out the line until the exact cause has been found and fixed.
SpeedyShare deleted the screenshots, here they are again.
Metal:
http://img520.imageshack.us/img520/6126/protoretometal.png
Napkin 1.0:
http://img401.imageshack.us/img401/3926/protoretonapkin10.png
Napkin SVN:
http://img3.imageshack.us/img3/5762/protoretonapkinsvn.png
I think this bug is fixed in SVN.
Re-opened at submitters request
Sorry -- I'm trying to look at this and can't see the pics. Can you either attach the screenshots to this bug or put them up, where I promise I'll look at them soon.
Alex, this is your code. Is he right in saying that NapkinUtil.finishGraphics should have the following code deleted:
jc.setBackground(new AlphaColorUIResource(
jc.getForeground().getRGB() & 0x00FFFFFF));
It seems odd that the background should be the foreground with the alpha bits cleared. Maybe this is debugging code left behind?
Sorry, I missed the repost of the screenshots, I can see those, never mind about that.
Thanks for re-opening this bug. My comment on 2009-06-16 11:23 ("I think this bug is fixed in SVN.") was wrong.
The bug still occurs in NapkinLAF 1.2, as well as in the current SVN version. My suggested fix (deleting a line in class NapkinUtil) is still applicable in the current SVN version.
Daniel
I have the same issue with napkinLAF 1.2 on Java6 (1.6.0_26) on Win7@64b:
disabled buttons are rendered incorrectly, as if they're painting their content getting graphics from other components' buffers or something.
Are there any plans to release nakpinkLAF 1.2.1 binaries with this glitch fixed?
Cheers! And thank you for this amazing look&feel
/Unai