Menu

#57 Graphics glitch on disabled components

open-accepted
None
5
2009-06-16
2009-02-18
No

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.

Discussion

  • Daniel Herding

    Daniel Herding - 2009-02-18

    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.

     
  • Daniel Herding

    Daniel Herding - 2009-06-16
    • status: open --> closed-fixed
     
  • Daniel Herding

    Daniel Herding - 2009-06-16

    I think this bug is fixed in SVN.

     
  • Ken Arnold

    Ken Arnold - 2009-06-16
    • status: closed-fixed --> open-accepted
     
  • Ken Arnold

    Ken Arnold - 2009-06-16

    Re-opened at submitters request

     
  • Ken Arnold

    Ken Arnold - 2009-06-16
    • assigned_to: nobody --> alexlamsl
     
  • Ken Arnold

    Ken Arnold - 2009-06-16

    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?

     
  • Ken Arnold

    Ken Arnold - 2009-06-16

    Sorry, I missed the repost of the screenshots, I can see those, never mind about that.

     
  • Daniel Herding

    Daniel Herding - 2009-08-24

    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

     
  • Unai

    Unai - 2011-07-04

    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

     

Log in to post a comment.

MongoDB Logo MongoDB